The retirement part of Social Security is conditional. The amount of the benefit is determined based on working salary and there is a (fairly minimal) amount of working years that must be recorded to receive it.
https://www.ssa.gov/pubs/EN-05-10070.pdf
The disability system is different (but also obviously conditional).