im thinking about having sex

I wanna have sex with my boyfriend but I need to plan ahead cause I dont wanna get pregnant. if I have sex without any protection and he cums in me but I take a plan b after will I be ok?