I think the key is to try to keep calm ourselves, talk calmly and try to bring their energy back down whilst allowing them to have their feelings. Once my LO is more calm I offer him a hug and just stroke his hair until he feels better. It's easy to lose it with them especially when you're in a rush so I try to breath through to calm myself haha. Once they start talking I think it's good to have a convo after they've calmed down if we have to address any bad behaviour but not during because it will just escalate the tantrum. But at this age it's better to see it as they are experimenting and testing boundaries rather than being 'naughty'. I get a bit scared when my LO has tantrums because he holds his breath and he has had two fainting episodes (related to other stuff but enough to scare me!) so my goal is always to calm him down as quick as possible if that makes sense, but you know your own LO and what will work for them x
Stay calm, offer a hug, redirect and distract
My son has a tantrum if I shut the living room door (he likes going in the kitchen) so I get down to his level & explain why it needs to be closed then offer him a hug & he usually chirps up again. X