It depends. If you actually repay more than $3,000 in 2024 from a prior year (2023) you can use the steps here to decide what to do.
Repayment of previously taxed income: The Claim of Right is explained more in the article below. However I will add some information here about how to report on your tax return to determine if it applies to you and how you prefer to enter it on your tax return.
Claim of Right