There’s a faster, simpler way to know when to use who or whom.
Simply answer your own question using he or him. If the answer is he, use who, and if the answer is him, then use whom.
Who / Whom ate my leftover pizza in the fridge?
Him ate it. — Sounds weird, right? Let’s try with he. He ate it. — He sounds better.
I thanked the woman who helped me. = She helped me.
I liked the woman whom I met last night. = I liked her.
Whom is used as the object of a verb or a preposition. In a day-to-day conversation, whom is rarely used; who is used instead. However, we use whom, and not who if preceded by a preposition. It is also important to indicate that whom is more formal.
Who(m) did you see? — I saw Julie.
Who(m) should I talk to?
To whom should I talk?