Refinance mortgage loan implications

Turbo tax states at this link

https://turbotax.intuit.com/tax-tips/home-ownership/deducting-mortgage-interest-faqs/L4a9KF9mI

 

"Deductible mortgage interest is any interest you pay on a loan secured by a main home or second home that was used to buy, build, or substantially improve your home. For tax years prior to 2018, the maximum amount of debt eligible for the deduction was $1 million. Beginning in 2018, the maximum amount of debt is limited to $750,000. Mortgages that existed as of December 14, 2017 will continue to receive the same tax treatment as under the old rules"

 

How does this work if say a $1m loan is taken out before 2018 but a refinance happens after 2018?  Is the $1m loan refinance now considered a new loan that is subject to the $750,000 max limit?