In the first case, White is not in check, but it also doesn't have any legal moves because the Black Queen covers all possible fields, which is a textbook example of stalemate.
You don't win by pushing your opponent into a corner, you win by capturing their King.
https://imgur.com/a/XTyJzwn