When should I take a pregnancy test

I had unprotected sex about 2 and a half weeks ago and my boyfriend didn’t pull out 2 times and he finished inside me... I know it’s stupid what happened but I am here for advice not criticism. When should I take a pregnancy test? I am on birth control (the pill) and I take it at around the same time everyday I’m pretty good about that. I missed it a couple times (after the unprotected sex) and I have bled because of it . I don’t know if that means anything. Please give me advice