Pregnancy? The pill?

I’m on the pill and take it correctly and I had sex four days before my period, should I be ok? Should I have to worry about pregnancy?