The Social Security Administration takes our highest 35 years with earnings in our life time to determine our social security retirement benefit payment amount. So, with a long-working history, you probably have already made the highest 35 years already.
If you have not had 35 years in history. Then, any working amount in the year with earnings can help to increase your amount.
Working more can increase someone with 35 years of working history already is ONLY IF the salary will make a new year with earnings higher than any of those prior 35 highest years one already has. Then, any one new, higher yearly earning amount will replace one earlier, older, lower years in the social security calculation.
You may want to go to a local social administration office to have them print out your work history and see what your highest 35 years are so far. Then, you will know exactly how much more you need to work to make your social security amount higher.
Please feel free to follow up.
Below are some social security website link for your further reading and reference.
Fiona Chen, MPA, Ph.D., CPA, ABV, CFF, CITP