ChatGPT says this:
That description rings a bell, but it could fit several classic adventure games. Here are the ones that come immediately to mind:
Gabriel Knight 2: The Beast Within
Has a Bavarian castle.
You explore towers, battlements, and rooftops.
There are sequences involving observing things from elevated positions.
Less emphasis on a telescope puzzle, though.
King's Quest VII or King's Quest VI
Castles with towers connected by rooftops and battlements.
Sierra adventures often had "look through" puzzles involving telescopes or spyglasses.
Broken Sword: The Shadow of the Templars
Includes castle exploration and observation puzzles.
Doesn't quite match the rooftop traversal.
Discworld II: Missing Presumed...!?
Contains castle towers and observational puzzles.
Very humorous, though, so you'd probably remember the comedy.
The Longest Journey
Includes castles, balconies, towers, and using optical devices during puzzles.
Dracula: Resurrection
A large castle where you move between towers and balconies.
Several puzzles involve examining distant objects.
A few questions that could narrow it down:
Was it first-person (like Myst) or third-person point-and-click (like Sierra or LucasArts)?
Around what year did you play it?
Was the castle medieval, fantasy, or Victorian/Gothic?
Do you remember whether the viewing device was a telescope, spyglass, binoculars, or perhaps just a magnifying lens?
Was the game mostly about solving puzzles, or did it also have combat?
The detail about moving across the rooftops from one castle tower to another is distinctive. Combined with the balcony where you needed an optical device to spot an important clue, it feels very much like a classic 1990s adventure game. If you can remember even one more detail—such as the art style, whether the protagonist was male or female, or whether the game was on PC or console—I can probably narrow it to one or two titles.