People who worked in the USA are entitled to collect Social Security once they are old enough. This applies regardless of whether they are still working. In other words, current income doesn't reduce Social Security benefits.
The social security taxes you pay are used to buy credits. You can buy a maximum of 4 credits per year. Once you have 40 credits you are allowed to draw benefits from the system - when you are old enough. If you only have 39 credits, you don’t get social security.
When you go to collect benefits, there is a complicated formula based on income records that is used to turn your taxes paid into what is essentially a lifetime annuity. If you keep working, you keep paying social security taxes and you keep buying credits, but your annuity doesn’t change - you are forfeiting 100% of the tax you paid.