You will receive a 1099--G for 2021 since you received the money in that year. You need to report this as income on your 2021 tax return. If you are using TurboTax just search for 1099-G and use the "jump to" link to enter it.
You will report the $500 payment on your 2022 tax return since you actually paid it in 2022.