The Social Security Administration recalculates your retirement benefit each year after getting your income information from tax documents. (If you have a job, employers submit your W-2s to Social Security; if you are self-employed, the earnings data comes from your tax return.) Social Security will take any work income from that tax year and figure it into your benefit calculation.
That calculation is based on the average monthly income from the 35 best-paid years of your working life (as indexed for historical U.S. wage trends, a process akin to adjusting for inflation). If your recent earnings make the top 35, it will increase the monthly average and your benefit payment.
You can call Social Security at 800-772-1213 to ask about how your earnings might change your benefit.
Keep in mind