https://www.aarp.org/retirement/social-security/questions-an...
The SS tax is to pay current retirees. There's a formula that states how much you'll get when you retire, but the money you're putting in now is not being saved/invested for your benefit in the future.
The short version: Money you put into SS is not your money.
Furthermore, if you renounce your citizenship, it is you who are choosing not to get this benefit. It is a defined benefit for citizens, and you are choosing not to be one.
As for similarity to pensions: Far from it. When the government has an excess (i.e. total SS taxes collected is greater than payouts for a given year), they are not allowed to hold it or invest it. Pensions are/were always invested, or at least held.
Individuals who renounce their US citizenship (or were never citizens) are still eligible to receive SS benefits; SS actually has very little to do with citizenship.
Money put into Social Security is just lost to you unless you are renouncing your money after retirement.