That's not how Social Security works, and it never has worked that way.
SocSec is not a retirement account. It is a program that provides income to people who are retired, and it is funded by payroll withholding from people who have not retired. Prior to SocSec, there was a huge problem with poverty among the elderly, people who were no longer able to work, or not able to work the kind of demanding physical labor they used to. It was then, and is still now, wrong for society to abandon people to poverty when they're no longer able to work.
It should have been a proper entitlement instead of worker funded.
If we fund it through general taxes instead of payroll, you have the wonderful effect where everyone is covered and the program can never go insolvent. When population dynamics result in a generation of retirees bigger than the current workforce you just need to change tax rates or deficit spend.