What is the word or phrase that describes doing one [previously unimportant] thing to avoid doing another? Avoidance, procrastination or prevarication almost do it, but I'm sure there is something more accurate.
displacement activity (Cambridge dictionary)
an unnecessary activity that you do because you are trying to delay doing a more difficult or unpleasant activity:
When I was studying for my exams I used to clean the house as a displacement activity.
You could reasonably extend the usage to include things like scratching your head when you're unsure about how to react, or (metaphorically) tearing your hair out when you're hopping mad but not willing to actually attack anyone. But I think those more "visceral" displacement activities are more relevant to (animal) psychology than everyday usage, where people usually know (or can easily be told) that they're using a (semi-) deliberate avoidance/delaying tactic.