https://ielts.com.au/articles/grammar-101-who-vs-whom/
> if you can replace it with “him” or “her,” use whom
Source: parent