So if you sell a house and want to buy a new one, you have to pay for a mortgage you don't need?
You misunderstand.
We are talking hard paper cash here. It might help if we quote a translated excerpt here :
This practice is now being abolished by the introduction of Sec. 16a GwG. From 1 April 2023, it will only be possible to purchase real estate using means of payment other than cash, crypto assets, gold, platinum or precious stones. All parties to the transaction are required to present satisfactory proof of payment, for example a payment confirmation from a financial institution.
(source of excerpt https://www.gvw.com/en/news/blog/detail/prohibition-on-cash-...)
Electronic transfers such as ACH would be allowed.