If you have a form 1099-G for 2021, you have to report it as income on your 2021 tax return and pay taxes on it.
The repayment is a claim of right repayment and you can only claim in in the year you actually repay your unemployment benefits.
If the repayment is more than $3,000, please read this TurboTax Help topic on how to make the claim on the tax return of the year you repaid the amount.