Why was this stalemate? I'm new to chess and I don't have much knowledge. But I was playing a game as Black, and I was up by a lot of material and played Nxc4 to capture White's last bishop. The game ended in a stalemate, even though the king was trapped, I think.
[FEN &quot;2qk1b2/4n2p/1n3p2/3p4/b1BK4/5r2/7r/8 b - - 0 1&quot;]

1... Nxc4

Can anyone explain to me please why this happened and why I didn't win?
Stalemate

Stalemate is a situation in the game of chess where the player whose turn it is to move is not in check but has no legal move. ... In popular usage, the word stalemate refers to a conflict that has reached an impasse, and in which resolution or further action seems highly difficult or unlikely.

In the above position, your opponent had no legal moves but was not on check hence stalement. The objective of chess is to;

The object of the game is to checkmate the opponent; this occurs when the opponent's king is in check, and there is no legal way to remove it from attack. It is never legal for a player to make a move that puts or leaves the player's own king in check.

So if this is not achieved there is no winner unlike in checkers where you can win if your opponent has no legal move