I paid back some unemployment benefits in the same year I got them.
Easy case: report only the net. Subtract what you repaid from the Form 1099-G total and write 'Repaid' with the amount next to the unemployment line on Schedule 1. Keep the state's letter and proof of payment.
Sources
I repaid unemployment benefits I received in an earlier year. What now?
Don't change the earlier year: the benefits were taxable when you got them. In the year you repay, the rule depends on the amount. Over $3,000: you can take an itemized deduction or a credit for the tax the benefits cost you before, whichever is better. $3,000 or less: no deduction at all, because that falls under the miscellaneous itemized deductions that are permanently disallowed.
Sources
How does the claim-of-right credit work?
For a repayment over $3,000, figure your tax two ways for the repayment year: once with the repayment as a deduction, and once without the deduction but subtracting the tax the benefits added to the earlier year's return. You pay the lower amount. The credit route helps most when your tax rate was higher in the year you got the benefits.
Sources
Should I amend last year's return instead?
No. The benefits were properly taxable in the year you received them, so the earlier return wasn't wrong. The fix belongs on the return for the year you repay. The exception: if a Form 1099-G overstated what you actually received, that's an error, and an amended return (or a corrected form) is the fix.
Sources