Someone give me advice

I did anal today with my boyfriend and we used a condom but during it the condom broke but as soon as we heard it he pulled out. There was some precum but he never penetrated me vaginally or rubbed the precum on my vagina. Do I have a chance of pregnancy? Should I take a plan b??

p.s. it’s been 3 days since my period ended and I’m on the pill