How is this a stalemate instead of checkmate ??
stalemate is where the opponent king or yours has no squares to go and are not check. This keeps the game alive even when you are in a completely losing position.
My opponents king has no where to go, but the game gave stalemate just then!
Thats what stalemate is
I was cornering his king.
The very last move of the game was my pawn from G5 to G4.
My opponents king has no where to go, but the game gave stalemate just then!
There was no repetition up to this point.
How is this not checkmate?
You just gave the definition of stalemate. If your opponent is not in check, and they have no legal moves, that's a draw by stalemate.
Checkmate requires the king to he in check and have no legal moves to get out of check.

I was cornering his king.
The very last move of the game was my pawn from G5 to G4.
My opponents king has no where to go, but the game gave stalemate just then!
There was no repetition up to this point.
How is this not checkmate?