Your Social Security benefit is calculated from your earnings history. Still, you can influence the amount -- even as you near retirement. You could, for example, raise your working income in the last few years of your career to push your benefit higher. Waiting to collect Social Security would also increase your benefit.
Relative to an annuity, Social Security has the obvious advantage of no up-front cost. If you delay your retirement to raise your Social Security benefit, you will forgo income up front. But at least that money doesn't come out of your savings account.