Plan B + Conceiving

My husband & I decided we would start trying to conceive this last month. I have had some pain in my abdomen for quite some time. I went to a hernia dr and he confirmed I had multiple hernias that would require surgery. So now knowing I’m possibly pregnant from a few days prior and not knowing if the hernias will have any effects on the pregnancy or delivery I’m not sure what to do. I’m considering a plan B, then have my surgery and try as soon as possible for pregnancy after. Does this make sense? I wouldn’t even know when we’d be able to try again and if the plan B will really throw stuff off track? Does anyone ha e any advice?