Yes, the amount would be for the whole year if you lived there for 12 months.
You will include how many months you lived in that apartment or house and multiply the amount by the months you included.
1- lived there 6 months and paid $1200 per month, rent will be included as Number of months 6 and Amount paid in 2021 $7200
2- lived there 12 months and paid $1000 per month mortgage will be included as Number of months 12 and Amount paid in 2021 $12000
Thank you for using TurboTax.