Need some advices/reassurance

I’m just 21 y/o but soon be 22 next month.. I really need some help about it...

Well, I’m not even sure if I’m pregnant or it’s just my body tricking me... I start to have some symptoms of pregnancy such as nausea, food craving then loss of appetite, fatigue, mood swings and breast sore.. I had sex two times in different day which it was on May 31 and June 1. Unfortunately, it was unprotected sex and he pulled out on time but I didn’t even think about pre-cum until 2 days ago. I started to freaking out about it..

But I just had my period and I started last Wednesday and finished last Friday(June 6-8)I usually had period for 5 days but this month, it has been 2-3 days of period.

So is that even possible for me to be pregnant and had period? If so then how soon can I take a pregnancy test?

Any advices and reassurance would be deeply appreciate. Please excuse my grammar if I made any mistakes.. btw it’s my first post.