Pain in the gut

I have just eaten a cookie and that’s all I had eaten really so why is my stomach hurting. The pain started after I ate (sorry for the confusion)