LETS GO JESUS
BTW thanks to @OMGdidirealyjustsact for this:
OMGdidIrealyjustsact: To answer your earlier question: when you're 12, a lot of it just comes down to experience.
However, one thing that might be seed of future improvement is the idea of strategy:
matching your plans to the imbalances on the board.
In this game, the position really didn't ask for a queenside castle.
You'd swapped off your dark-squared bishop, making it difficult to attack my king since you can't remove my bishop
And the advanced pawns on the Queenside are targets for my Q-side attack on your king.
If you're gonna swap Bg5 for my knight, you want to castle kingside
and then do your best to close up the position to let the knight shine.
In other openings there'll be different imbalances, that require different plans.
The situation on the board determines what the plan should be.
That's the framework you should use for future learning. I hope this helps you.