When you satisfy the needs of your population, have cheap birth control and good sexual education (which was given in almost all socialist countries) people will naturally have fewer children. In poor countries people have the most children.
Under capitalism, people in many rich countries are panicking because fewer and fewer working people have to feed more and more elderly, even though we have the resources to easily meet their needs. But profits have to keep rising, so the shrinking working population has to be more and more productive. The superexploited growing populations in the global south are what keeps this system alive, so overpopulation is even encouraged under capitalism.
Capitalism is an oligarchy