You can start with the IRS Publication 915, specifically the chapter talking about lump sum retroactive payments.
Generally, you use your 2021 income to figure the taxable part of the total benefits received in 2021. However, you may be able to figure the taxable part of a lump-sum payment for an earlier year separately, using your income for the earlier year. You can elect this method if it lowers your taxable benefits.
There are worksheets available to calculate this correctly, the math may be non-trivial.
AARP has a high-level explanation here.
Box 3 of your SSA-1099 tax form will show the yearly breakdown of any
past-due benefits you received, and IRS Publication 915, “Social
Security and Equivalent Railroad Retirement Benefits," has
instructions for apportioning back pay into prior years to potentially
reduce your tax burden. But the formula is complicated, and you might
want to use tax software or consult a tax professional if you choose
to use lump-sum election.