Help !!!

So been talking to this guy for 8 months and I've realized every time he gets upset or annoyed he leaves, meaning that he tells me not to text him and when i do he seen's the message but at the end we always start talking again after 2 or 3 weeks of not texting. He always stop talking to me over stupid stuff, the last thing that happened was i told him i was going to sleep because i was tired and he called me after i said good night and start saying if I didn't see his text and I'm like i went to bed and he starts saying ok I'm not important and for me not to text him anymore.

Can someone please help me try to figure out why he does this? 🤦🏽‍♀️🤦🏽‍♀️