What is going on with me?

Okay so I had sex late June (my boyfriend wore a condom and didn't cum) and I caught the stomach flu and thought I was pregnant and had my period right after it was kinda over. So then now this mouth my stomach started hurting and I was thinking I was pregnant even though I had my period last month and didn't have sec since June. But no I was eating a lot of irregular food and I started getting gassy. And a mix with my period symptoms (eve said its coming in 5 days) I don't know why I keep thinking I'm pregnant when I'm really not.