Pregnancy after hernia repair

I have a hernia that I need to have surgically repaired and I’m wondering if I have it fixed if that means I can’t have more kids? I know they say I should wait, but I’m not sure I’m done having kids and don’t want to be in pain while I figure it out.