Confused

My period is supposed to be coming up in like 4-5 days, I had unprotected sex a couple days ago (I’m almost 22, it was a choice him and I made) I’m not sure if I’m pregnant or not, when do I do a test? I’m not trying to be pregnant but if it happens it won’t be a bad thing.