You can claim prior years' property tax in the tax year you paid them. For example, if you paid your 2021 property taxes in 2022, claim them on your 2022 taxes. However, you can't include any late fees, interest, or penalties—just the tax itself.
Starting with tax year 2017, you can still claim prepaid property tax but only if it was also assessed in the tax year you're attempting to claim it.
In other words, if your local assessor sent you the 2023 property tax bill in 2022, and you paid it by December 31 of 2022, you can claim it on your 2022 return.
However, if you didn't get an assessment for your 2023 property tax, but you went ahead and paid it anyway by the end of 2022, you can't claim it on your 2022 taxes (but you could on your 2023 taxes, assuming you get assessed in 2023).