Repayment of Social Security benefits in a subsequent year

I completed form SSA-521 to withdraw my social security benefits in late 2021 but will not be repaying the funds until 2022.  I am sure my 2021 SS tax statement will show the benefits as income for 2021.  How is this handled?  Do I show the entire amount as income for 2021 and then take a credit after repayment in 2022? Or do an amended 2021 return after the funds are repaid?  I saw an earlier answer to this question but not sure if it is still current as some of the IRS website links did not work.  Thanks.