The ideal age to have a baby is as early as possible because when you're younger you're more fertile and have a better chance at the pregnancy and better chance at having a healthy baby.
If you're ready to have a baby at 18 years old then that is the ideal age and when you're most fertile for having a baby but some people wait until they are 20, 25 and even 30 years old to get pregnant with a baby.
But after 30 years old the woman becomes less fertile although it's still possible to give birth and get pregnant after 30 but you have an easier chance of getting pregnant before 30 years old.
You also have less risk of complications if you have a baby before 30 years old.
But always wait until you're absolutely ready to give birth and get pregnant because taking care of a baby is no easy task.