White has Rh3 mate and is ahead a rook and two passed pawns that are about to queen.
The point of the puzzle is avoiding a draw, so you have to choose between Kh1 and Kf1 (Kf1 is a draw).
It's a very bad puzzle since Kh1 is a natural move that most people will play without thinking, and Rh3 mate is an uncommon pattern, and the reason why Kf1 draws is not super obvious (Qa6-a1-a2 wins the rook, and since white's king has little cover and white's queen is out of play for a moment, there's a perpetual check or both sides queen).
Anyway, a better version of the puzzle would end after Kh1.
Since puzzles are mined from a database of games by a program, what the puzzle mining program is looking for is moves where only 1 move wins... as long as white wins no matter what, it will choose a move for black that has only 1 way to win, even if that move is really bad... and that's the technical reason why the queen sac happens.
https://www.chess.com/puzzles/problem/1926080
I don't understand why opponent would just sack a queen ever like that...
Thanks in advance.