The one child policy had a surprisingly little effect with this; there were so many exceptions, for example farmers and god knows what else, allowing something like 60% of the population to have more than 1 kid in the end, that the differences only became stark recently after it had time to be enforced, and mostly in the cities.
For most of the previous decades, they simply did a rather effective propaganda campaign, which they then just messed up with the one child policy lol:
Now of course, you have an economy built on extremely shaky dependencies on for example, infrastructure and GDP quotas that life has become more unaffordable than ever - Western city folk need about about 7-12x the average median income to buy a home.
Shanghai? 35x. Shenzhen? over 40x... untenable. Who'd have a kid when it'll take until retirement to buy a home... which you are only really renting for 40/70 years. You can't even pass it down.