14a-demethylase and conversion of lanosterol → ergosterol is an intermediate step between squalene → ergosterol. See AMBOSS article here that states key enzymes involved in synthesis of ergosterol are squalene epoxidase and 14a-demethylase here:https://next.amboss.com/us/article/KM0Upg?q=ergosterol#Z230c3658202a17a44bd0a53bfadfc490