How do I handle a 6 year old tantrum?

I have a parenting thing I want to change because it dosent seem quite right. I don’t know what I’m supposed to do so I’m looking for opinions and advice in what to do when this certain situation happens with my 6 year old son.

He doesn’t usually get into crying fits and it’s very rare, but today he did and I didn’t know how to handle it.

He was upset because he said he wanted eggs for dinner, so I said ok let’s have pancakes and eggs when it’s time for dinner but it’s not quite time yet.

He got mad and started to cry.

I nicely explained that it was to early in the day for dinner and offered other small snacks he likes while we wait for dinner time to arrive. Dinner time is almost 2 hours away.

He just fell to the floor and started sobbing more.

I walked away. Is it wrong to just walk away when I think he’s being irrational? I don’t want him to feel like he’s not important. At the same time though, it’s a tantrum he’ll be over it soon. A few mins later my husband checked on him and tried to talk to him but my son ran away still crying. After a few mins he stopped crying.

Did I handle this wrong?

We do tell him “soon” or “just wait a little longer” pretty often and I think he’s tired of it. Also sometimes when I say soon a lot longer passes unintentionally so I think this irritates him. I wonder if this is part of the cause of the meltdown or if I just chose the wrong words or he’s just being emotional today. I think he threw a random tantrum and I’m thinking to far into it but I don’t want to seem like I don’t care. How would you handle this?

EDIT: he eats and then immediately wants more right after and does this a lot.

He’s a snacker, and then he will not eat his dinner because he fills up on snacks.

This is what happened in this situation. (Didn’t give him a snack cause he was busy crying)

My parents used to say no to snacks when I was a kid they’d make me wait HOURS before dinner and I was starving! Made me have a bad relationship with food.

So no I don’t deprive my kid of food ever and yes I’m replying to that one comment that didn’t understand my post at all saying they would deprive their kid of food lol total opposite of what’s going on.

He can go an hour or 2 without a snack shoved in his face he just likes to snack all the time. Bunch of snacks before dinner isn’t a good idea.