how to stop the scholars mate

Avatar of creative12345
| 0

as you can see, black has missed white threat of Qf7 checkmate and played Nf6?.