4 year old will not eat

I need help. My 4 year old started Pre K recently and he will not eat all day. He will eat a little breakfast before we go. He won’t eat the lunch I send with him even though it’s his favorite foods. And when he comes home at night he is too exhausted to eat dinner. Last night he was groaning in bed that his stomach was hurting because he was so hungry and I fed him crackers at midnight. But he just will not fucking eat. I am so stressed at dinner because he literally just sits there. He won’t eat anything, even all his favorite foods, ever since he started school. What do I do? I’m worried for his health. From the time he comes home until he goes to bed he whines and cries constantly, won’t nap, but also won’t play, won’t eat. It’s miserable.