Help!!

I just had brown spotting last week. I had unprotect sex last week at same time as I had brown spotting. My stomach was crump and hurt. My brown spotting stopped on Saturday. I didn’t take pregnant test yet because I needed to wait until next week or this. But, I am tired and have mood swings. My back is hurting! Does I need to take pregnant test to see if I am pregnant or not? Help!!! I don’t know what to do!! Everyone had that before? Please let me know