Source: The Economic Times https://bit.ly/3OxJC9C

The EMI you pay is made up of two parts: principal repayment and interest paid. The major component of the EMI can be deducted under section 80C of the Income-tax Act of 1961 for self-occupied property. Section 80C deductions can also be claimed for stamp duty and registration fees paid when purchasing a home.
Note that if you have a second home that is empty or if your parents live in it, that second home will likewise be considered self-occupied. If you have rented out your second home, it will be referred to as ‘Let out property.’

Deduction on repayment of principal amount of home loan
The EMI you pay is made up of two parts: principal repayment and interest paid. The major component of the EMI can be deducted under section 80C of the Income-tax Act of 1961 for self-occupied property. Section 80C deductions can also be claimed for stamp duty and registration fees paid when purchasing a home.
Note that if you have a second home that is empty or if your parents live in it, that second home will likewise be considered self-occupied. If you have rented out your second home, it will be referred to as ‘Let out property.’

Deduction on interest paid on a housing loan
A tax payer can deduct both the interest paid on a house loan as well as the principal amount that was repaid on the loan. In the case of self-occupied property, section 24 allows a deduction on the interest paid on a house loan up to a maximum of Rs 2 lakh in a given fiscal year. In the case of self-occupied property, interest payments above Rs 2 lakh would neither be carried forward nor offset against any other income head, such as capital gains, salary, etc.

If you own two homes and one of them is vacant or occupied by your parents, section 24 also covers the interest on any home loans acquired for the other home. The total tax deduction for home loans for two homes cannot exceed Rs. 2 lakhs in a fiscal year.
Additional deduction on buying an affordable house

An additional deduction on the interest paid on a home loan used to buy the house is available if you purchased it under the affordable housing category. A maximum of Rs 1.5 lakh can be deducted under section 80EEA in a fiscal year. It is allowed for a maximum of Rs 2 lakh in addition to the deduction under section 24. A tax payer can thus claim a deduction of up to Rs 3.5 lakh in a fiscal year in the case that they purchase a reasonably priced home.

Deduction under section 80EE
For first-time homebuyers who took out mortgage loans, this deduction was reinstated in FY 2016–17. Taxpayers who took out a home loan in FY 2016–17 were eligible to claim an extra tax deduction under Section 80EE of up to Rs 50,000. Presently, under Section 24, a home loan borrower who pays interest on the loan may deduct that interest from his or her gross annual income up to a maximum of Rs 2 lakh. The deduction of Rs 50,000 introduced in Budget 2016 is in addition to the Rs 2 lakh limit.