Maybe that castling gets the king into a safer square while bringing the rook into the center?
How is this a brilliant move?

a "brilliant" move is just when you make the move that is:
1. the computer's top choice
2. a sacrifice. the move above appears to hang a knight. go into analysis to find out how it doesn't.

Maybe that castling gets the king into a safer square while bringing the rook into the center?
Maybe you didn't have a lesson about it, or chess.com thought that you're in trouble and this move would turn around the game for you, OR you did this move vey often by following the motivation "Castle early, castle often" or something like that...

a "brilliant" move is just when you make the move that is:
1. the computer's top choice
2. a sacrifice. the move above appears to hang a knight. go into analysis to find out how it doesn't.
It could have been the computer's top choice. Well, not exactly a sacrifice.

it was, that is why it is a brilliant.
also, I found the game, and you can see that if black takes the knight, then black's knight is pinned to the king and cannot be saved after d4. black can threaten the queen and bishop for a few moves, but in the end it changes nothing and the knight is still lost.
I just dont get why this is brilliant. Can someone tell me why