I have rental property that I spent $20k fixing up this year but only rented out one month - do i get the tax write off for all of that?

I had to evict renters that were hoarders Nov 2023 - it took me months to clean out, get new floors, paint, fix up. HOA then said I couldn't rent out due to HOA rule where only 25% of houses can be rentals. I final was able to rent out Dec 2024. If I can't write off $20K this year can I save expenses to offset next year?