You didn't win. You don't win by taking all of your opponents'pieces, you win by checkmate. It was a draw because you cannot get a checkmate if your opponent cannot make their move, and they couldn't move their king. This is different from checkmate. If one of your pieces is attacking the king, and it also cannot move, you win. But the king is not being directly attacked if it is stalemate.
https://www.chess.com/analysis/game/computer/187468659?tab=analysis