Can I be pregnant If I vomited

I had my period last week, haven’t had sex ever since and today I went to the gym in the morning, had a banana before working out, and had only slept for 5 hours

I was at the treadmill machine for 10 minutes running and drank 12 oz of water. Then I was doing some warm ups when I started feeling nauseous. I went to the restroom and I vomited yellow liquid. I am a very anxious person and although I know I had my period last week and haven’t done any type of sexual activity I’m still worried I could be pregnant? Why did I vomit?