Every hilltop castle in Spain has the same secret
Castles on hilltops that were built to be defended and ended up beautiful almost by accident.
The view is the point
This is the thing nobody tells you, and once you notice it you cannot stop noticing it.
They were put where they were so somebody could see trouble coming. Line of sight was the whole design brief. Which means every one of them, without exception, looks out over something worth standing still for.

You go up for the building. You stay at the window.
Wear real shoes
The approach is always cobbles and always uphill, and it is always further than it looked from the car park.
That is not a complaint, it is a packing note. One pair of shoes you can walk on uneven stone in will change how much of a trip like this you actually enjoy, and sandals will quietly decide which castles you skip.

The walled towns underneath
The castle is usually not the only old thing on the hill.

Leave time to be at the bottom as well as the top.