Had unprotected sex, took Plan B

gabi

I went to a party yesterday and I had sex with this one guy twice. The First time he pull out and we clean up then we had sex again right after. The second time he still pull out. I took the plan b pill the next morning because I’m not on any birth control, also we had sex right after he pull out, and also i was at the end of my cycle. I’m just nervous would the pill actually work?