I'm a beginner and right now rated 1850 in on lichess training; so I'm a very novice player. I try to solve some training examples, and though sometimes I do not feel convinced by the solution given by the computer, I continue. Here is an example where I felt the solution was absolutely wrong. Below are the pictures
Why did the computer save the queen rather than killing the knight on g3 with the pawn on h2?
I thought of this step when solving it but thought it was of no use. But the solution given left me wondering.