I think I did hear you had to wait at least 40 days after birth but ask your dr to make sure.
they advise u to wait at least 6 weeks after giving birth. U can do stomach exercises which they show u or tell u. And ur pelvic floor exercises too. With bleeding and stuff u don't want to push ur body as it will go through a traumatic experience.
Another thing to consider is your baby is very fragile in its first months. Do you really want to go to the gym and possibly bring home viruses to baby? Even a common cold is absolutely miserable for tiny infants.
If you are cleared to work out, maybe doing it at home or walk/run in your neighrborhood until baby gets stronger is a option you can consider.
Talk to your OB about this. Even if you have the best of intentions now, you don't know what your body is going to feel like after birth. Things like c-section, a lot of stitches down, anemia, hormone fluctuations could all hinder you from working out too soon. If you have any post delivery health conditions you will definitely need your doctor's clearance.
Also, are you planning on breastfeeding? I found that working out affected my milk production a lot. I had to stop to keep my milk up.