Shaming someone for caring about Thing X when unrelated Thing Y is far more dire just doesn’t hold water. The common modern-day term for this is “whataboutism.” Whataboutism is most commonly deployed as a defensive strategy. Someone is caught doing something bad—anything from an actual crime to saying something mildly offensive on the internet—and then instead of owning up to it, he says, “Well, what about [Way Worse Thing X]?!” or “What about that bad thing you did?!”5 or “What about the fact that I also did [Good Thing Y]?”
These are "fallacies of relevance," like citing an irrelevant reason, or ad hominem (which attacks a person rather than a position).