why a stalemate?

When the player to move has no legal moves and their king is attacked, then that's checkmate.
When the player to move has no legal moves and their king is not attacked, then that's stalemate (a draw).
A reasonable way to avoid stalemate is by not capturing all your opponent's pieces before trying to checkmate them. That way they're more likely to have a legal move.

You need to go back to basics - how the pieces move and capture, the laws and rules of chess and chess etiquette.
These are the 1st 3 lessons I teach my students (learning the game for the first time).
I am a 1900 FIDE rated player / coach out of New Zealand.
40+ years chess experience, 7+ years coaching experience.
Happy to coach via Zoom or other video conferencing platforms.
Students of any age, ability up to around 1600.
Reasonable rates, happy to negotiate.
http://www.richardchristie-chesscoaching.mozello.com/
https://www.facebook.com/Richard-Christie-Chess-Coaching-107358937717771
Cheers
Richie