I think you had to evaluate which pawns are more valuable.
At a glance we can see that the g4 pawn protects f5 so if we lose that then our f5 pawn can be lost and so we need to defend it at all costs if we don't have an immediate win. You can do this by preventing the king infiltration with Ke3 and then if Nf6 then just Bg7.
The base of the pawn chain is what needs to be considered I think
I have been playing a few games where basic principles would have guaranteed me a win. One game two days ago had the king outside the square and I completely forgot to check this in the game. I could have won it hands down, but I took my opponent's g pawn before advancing my h pawn.
Now, I have another game I can post here. I was wondering if there was a book that has this actual type of blunder. It could either be categorized in two ways I see. Either we have an opponent's weak pawn which shouldn't be taken, or it is a matter of not allowing the opponent's king to enter your area (which then has targets like the weak pawn in the position below).
I know I can read general books about this sort of thing, but is there something I can access like an MCO for openings where I can go over this kind of mistake? Again, I know there are already categorized "other" endgames. But specifically, is there something that deals with going after a weak pawn when you shouldn't or when you should block a king from entering your area? Maybe there is a third category based on the position. Ne2 could have been played as well, though it doesn't give as strong of a position for white.
Maybe there is a set of puzzles where 10 are randomly generated or presented which have 5 where the bishop can ignore the opponent's king moving and 5 which require the opposing king to be blocked. Like in this position.