Rental Property Improved in 2021 but Sold in 2022

I have a rental home.  I rented it out for 2021.  While it was a rental I made improvements to ready it for sale in 2021.  It did not sell until February 2022.  Do I have to input the improvements as expenses against the rental property in 2021 or can I input it as a deduction against the sale in 2022?  Thanks!