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