Pregnant Question

What does it mean when you have a stomachache? I threw up what I ate in the morning so I ate crackers after with juice and my stomach was growling so I ate a yogurt & took a nap. I woke up hungry so now I’m eating a sandwich with fruits but my stomach still bothers me. I’m guessing I’m not eating good or can it be something else?