Get your taxes done using TurboTax

From IRS Pub 527 : 

Pre-rental expenses. 

You can deduct your ordinary and necessary expenses for managing, conserving, or maintaining rental property from the time you make it available for rent.

 

Vacant rental property. 

If you hold property for rental purposes, you may be able to deduct your ordinary and necessary expenses (including depreciation) for managing, conserving, or maintaining the property while the property is vacant. However, you can’t deduct any loss of rental income for the period the property is vacant. 

 

Rent. 

If you are a cash basis taxpayer, you have no rent attributed to 2022.

If you use an accrual method, you report income when you earn it. So, if your tenant moved in Dec. 16, you could claim the pro-rated rent in 2022, even though your Realtor paid you in 2023.