The US is one of the few countries in the world that HAS a fixed mortgage longer than 5 years... we're the exception not the norm
You obviously have to pay back the remaining debt, but this makes it super smooth to either pay off all debt in one go or refinance.
Anything after the 10-year-period comes without any kind of penalty.
Getting out of the contract earlier is possible, but comes with a penalty called Vorfälligkeitsentschädigung — it boils down to the bank demanding the interest payments you would have paid if you‘d stayed in the contract for the whole 10 years.
However, afaik, if you also had an agreement on „Sondertilgungen“, that is, if the contract allows to pay x% of additional down payment every year, the bank must assume you had paid this for the remaining years in the contract.
No financial advice.