Even though there are 64 squares and only 32 pieces, those squares can run out and your pieces can be left out without legal moves and getting trapped. It is a frustrating situation when you can't save a piece from being taken because you didn't foresee it would get trapped a few moves before.
Sometimes, even with a pawn move, you can take away your opponent's safe squares. Even queens are vulnerable to be trapped because any trade for a lesser piece is dangerous.
The Queen is such a powerful piece and it controls so many squares, it is hard to believe it can be trapped, but with the correct tactics and a positive position, every piece is trappable.
Black just played Bxh2, capturing a "free" pawn. Can you find a way to trap the bishop?
A simple pawn moving forward blocks the path from where the bishop entered. Black's bishop is trapped, so Black tries to send help with the h-pawn. Let's attack the trapped piece!
Black's bishop has no escape. Black should have at least captured the White pawn on g3 to get more for the trapped piece but that's ok, now we can capture the bishop and trade a pawn.