After you file

Turbotax answer was incomplete. you have an option in 2022 if that's when you make the repayment and it's more than $3000. you can take as a deduction on Schedule A (usually not the best option) or you recompute your 2021 taxes as if you never got the amount repaid.  that should decrease your taxes. the decrease in taxes can then be taken as a credit on your 2022 return.