Communist Romania did it simply by outlawing all forms of contraception. TFR jumped from 1.9 to 3.7, nurseries were very busy, and the rivers were full of dead unwanted babies (as that is the thing humans seem to be hardwired to want to do with unwanted babies). It didn't last as people found ways to get contraception anyway within a few years.
banning contraception in the present time would have even less impact. the percentage of single/never married fertile age adults today is much higher than it was in communist-era Romania. "NCFMR analyses of ASEC Current Population Survey, 2022" says 73% of men and 65% of women among 18-29 in the US.
it is however one of those "stick" things both totalitarian and non-totalitarian countries will inevitably attempt at some point in near future, now that it's clear that none of the "carrot" things make any fucking difference. likely not with outright bans, not even in China, but by artificially limiting availability and raising prices of condoms and pills with tax. like the rest of those things, it will predictably have little to no positive effect.