Plan b please help?

So I had sex on the 4th day in my fertile window unknowingly. It was unprotected and he didn’t cum inside me but we didn’t finish at all because of something happening. I took a plan b within the first 24 hours because of pre cum and just to be safe but I heard it doesn’t work during those days. Any help please?