See Points, General Rule and refinancing in Publication 936 (2020), Home Mortgage Interest Deduction | IRS which includes this example:
Example.
Dan paid $3,000 in points in 2009 that he had to spread out over the 15-year life of the mortgage. He deducts $200 points per year. Through 2020, Dan has deducted $2,200 of the points.
Dan prepaid his mortgage in full in 2020. He can deduct the remaining $800 of points in 2020.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"