White has the nut of a discovery on the long diagonal leading to h8. His queen has no piece to attack if the knight moves, but since it’s aimed in the general vicinity of the king you consider squares the unmasked queen could attack, not just pieces. Look for any checks the queen would be able to give and you find Qh8—and see that would be mate. Black would no more be free to ignore that threat than he would be to ignore a discovered check. The knight therefore will have an unfettered move to make after it vacates the queen’s path to h8, and can use it to go after Black’s queen: Nd5, and then—after Black takes measures to avoid being mated—NxQ.