How soon do you ovulate after having a baby?

I had a baby 5 weeks ago. I’m supposed to have an IUD placed next week but we had sex today and he cummed inside of me. I’m not sure if it’ll be okay or if I need to get Plan B. I am breastfeeding and stopped bleeding a little before three weeks.