About Birth Control..

Is it okay to have unprotected sex while taking birth control? I’ve been taking it for a long time. Me and my boyfriend have had unprotected sex and i haven’t been tracking my periods regularly like I should be. (He pulls out every time) So now I don’t even know when my period should come because my last period was last month. And then like a week after my period, I was spotting. (which are some symptoms of birth control). I’ve been taking my pill like I should be. And haven’t missed a pill in about two months. I’m really stressing that I could be pregnant, but that’s the whole point of the pill, right?