Just drew this winning position as black
White to move in the picture. What's the goal here? Like should black be looking to take that pawn? How can I stop losing these situations
What's a rule I can think of to win these situations?


In the situation you posted, white cannot defend.
To win, you need to learn how use the opposition, which is a way to force your opponent's king out of the way. I am sure that Chess.com has lessons on this. Basically, if your opponent could stay on f2, you couldn't advance, but he has the move and his king is the only piece that can move and so he has to go to e2 or g2 (or totally abandon his f pawn.)
If he moves to e2, you can go to g3 and he will have to abandon his f pawn next or your h pawn sails in.
If he moves to g2, you can go to e3 and he will have the choice of abandoning his f pawn or advancing it so that you can take it.

Get in front of your pawns. Pawns need your king as an escort or the they’ll be captured.
Take opposition. If you(r king) needs to get by your opponent’s king, get exactly 2 squares away in a straight line, and make it their move. If they ever move their king, backwards or sideways, you can get by.