The rook in this position lifted from h1 to h3 a few moves ago and has been sitting there since. Short castling is dead for the rest of the game, and it will stay dead if the rook walks back to h1 tonight. But look at the other side of the board: the a1 rook has never moved, the king has never moved, and 1.O-O-O is legal right now.
8
7
3
2
a
e One rook, one right
Each rook carries its own castle, and that is the whole difference between this rule and the one about the king. Move the king and both castles die at once. Move a rook and only its own side dies.
So White in the diagram has one castle left instead of two. In FEN terms the rights field reads Q for White, not KQ. Black, who has touched nothing, still has kq. Nothing about the h3 rook’s future changes that: it can return to h1, it can sit on h3 all game, it can be traded off, and short castling is still gone.
The rook also has to actually be there. If Black’s bishop takes on h1 before White has castled, the right dies with the rook, exactly as if it had moved.
The rook moves people regret
Three of them come up again and again in beginner games.
Rh1-g1 after g2-g3, to put the rook behind the g-pawn. It looks purposeful and it quietly ends any chance of tucking the king into the corner.
Ra1-b1 in the Sicilian and in many queen’s pawn openings, played to support b2-b4. Fine if you were going to castle short anyway, and a real loss if you had queenside ideas.
And the worst one: moving a rook to defend a pawn on a2 or h2 in the opening. The pawn is usually not worth a castle. Let it go, or defend it with something else, or count carefully whether the capture even works.
Choose the side before you touch anything
The practical fix is to decide where the king is going by about move six, then treat the rook on that side as untouchable until the king has arrived. Look at where your opponent’s pawns are pointing, look at which centre files are opening, and pick. There is a page on short against long that goes through what to weigh.
If you cannot decide yet, do not move either rook. Develop a knight, develop a bishop, make a useful pawn move. Keeping both castles alive is a real asset: your opponent has to prepare an attack against two possible king positions instead of one, and strong players will happily spend a couple of moves keeping the question open. You can see how much a lost castle costs by playing through some opening puzzles where one side’s king never gets out of the middle.