A couple years I posted about castling “through” check. Of course, you cannot really do that in chess, but, when castling long, sometimes the Rook goes through the checking square, which can create the illusion of castling through check. (The King is the piece that is not allowed to pass through a checking square, but the Rook can).
See the previous post if this sounds confusing.
I had mostly forgotten about this, but today I was playing a game where my opponent, desparate to get out of trouble, tried castling this way. The move that followed demonstrated why this can be a dangerous thing to do. The King is often cut off from an escape route. In this game, it was instant checkmate. In other games, you are usually putting your King in a restricted environment. In any case, this is more just fun to look at than anything else:
On Move 18, Stockfish is already suggesting that Black play Rf8 given the game-ending threat of Rxf7 then Rf8+ followed by mate.
On Move 19, I did have to capture back before proceeding, because if I try to get cute by leaving the Queen en pris and going for the mate, Black can take the Queen with check and then sack his own Queen back with Qf6. Black is still in a fairly hopeless position, but the game continues.
On Move 22, Black cracks under the pressure. Finally able to free his King from prison, he plays the immediately fatal O-O-O.