I went to the trouble today to figure out how SS works. It's presented on the internet as indescribably difficult unless you log into SSA.gov and let their calculator do it for you. Actually, it's not hard at all.
The rules are, you take all your years of working. You find out the SS taxable amount you earned in each year, then bring that money forward to today with the SS inflation numbers. You take the best 35 years, meaning for most of us we get to throw our our 12-15 worst years of making money. You find your average monthly income during that period. Your benefits are 90% of the first $656 per month, which means all of us get $590 per month in benefits. You take 35% of the next $3300 income per month, which mean most of us get another $1055 per month, total so far $1646. Then you get 15% of money you made in excess of $4,000. Since you and your employer pay 12.4% tax, SS is a bad deal on money you make over $4000 per month. On the money you make up to $4,000 it's arguably a good deal. So, basically you should be getting $1646 / month, indexed for inflation. Less than that and you should earn more money. More than that and you made a poor investment.
You can pick to retire at 62, 66, or 70. This has non-trivial consequences, which depend on inflation rates, investment return, and life expectancy. You get nearly twice as much per month if you retire at 70 as opposed to 62. I don't currently know a clear way to make this decision on a strictly financial basis, especially as actuarial tables of life expectancy are great for insurance companies, but utter nonsense for an individual. You can retire at 62, then at age 66 you can pay all the money you got back to the government and start over with your age 66 benefits.
I can say without hesitation that the best deal by far is to get disabled, sooner is better.
You can go to ssa.gov and log in. SSA has all your earnings history on-line, and will let you run some limited what-if scenarios about your future earnings. My own record looks quite suitably spotty, with several years where I was paying the max, and a roughly equal number of years where I was paying nothing.
If you make your money in a sub-chapter S corporation, you get to pick your salary v. bonus. SS is not levied on the bonus, only the salary. No one knows the "correct" split between salary and bonus, but I've been told by a couple of accountants if you take the corporation's profits as 1/3 salary and 2/3 bonus the IRS will never give you a hard time.
If you're a working stiff, too bad for you. Unless you have on of those government pensions like Calpers, in which case I'm insanely envious.