According to chess.com, "White threatens both Qxh7 and Qxf8 checkmate-Black cannot defend against both threats." Would the threat the white Queen has towards h7 be enough to have a checkmate? How is Qxh7 relevant?
The threat of Qxh7 is VERY relavant. It is as important as Qxf8 is. I shall demonstrate.
Here is your intial postion for us all to see.
[FEN "r1b2r1k/pppp1p1p/2n4Q/8/q7/2PB1P2/P1P3PP/R4RK1 b - - 0 1"]
If Black moves their rook to prevent against Qxf8 checkmate and create an escape route for the king:
[FEN "r1b2r1k/pppp1p1p/2n4Q/8/q7/2PB1P2/P1P3PP/R4RK1 b - - 0 1"] 1... Re8 Qxh7#
Black will get checkmated. This is checkmate because the White queen attacks all of the Black king’s sqaures, and it is protected, so the Black king can’t take, and no other Black units can take it.
If Black tries to defend against Qxh7#:
[FEN "r1b2r1k/pppp1p1p/2n4Q/8/q7/2PB1P2/P1P3PP/R4RK1 b - - 0 1"] 1... Qe4 2. Qxf8#
The Black king gets mates by the threat from the first varation, and this is checkmate for the same reasons. Do note that 1... f5 by Black also defends agaisnt Qxh7, but it still falls Qxf8#.
In conclusion, the threat of Qxh7 is important because Black cannot prevent either way. There is no possible way to defend against both checkmating threats. If one threat wasn’t possible, Black could defend against it easily and eventually win the game with their extra material.
In other words, if White had only one checkmating threat, and Black could easily defend that one threat, White would be losing because Black has more pieces than White.