# Why is a $3d$ orbital in transition metal higher in energy than a $4s$ orbital? [duplicate]

I was studying this chapter lately, and this part of chapter always confuse me. I often think why $$3d$$ orbital in transition metal is higher in energy than 4s orbital? (the whole question will refer to transition elements). My confusion arises when I look at the explanation on a website (attached below), it says that because ionization energy always removes the electron from the highest, which mean that first removed electron is the last electron being put in the orbital, so I conclude that $$4s$$ is higher than 3d in transition element. But I found another website (attached below) stating that the highest orbital is $$3d$$. Now my question which one is the correct one?