Sex after having a baby

J • Mom to Baby Boy conceived through IVF- pregnant with #2!
I know you can't have sex for a while after having a baby but how long do you have to wait if you have a vaginally delivery vs a c-section? Can you have sex sooner after a c-section?