Correct checkmate position
You played that move one move too early.
The queen has to be protected first before it would be checkmate, by something like Bc4 (although your opponent is likely to see through the checkmate and defend it accordingly).