Question 1: Why is it that when you get to the transition metals (or the d-block), the energy of the $\ce{3d}$ orbitals becomes slightly less than that of $\ce{4s}$, making $\ce{4s}$ have the electrons with the most energy?
Also, is it correct to write electron configurations for transition metals with the $\ce{4s}$ orbital being the outermost one? For example like this $\ce{Sc = 1s^2 2s^2 2p^6 3s^2 3p^6 3d^1 4s^2}$ instead of this $\ce{Sc = 1s^2 2s^2 2p^6 3s^2 3p^6 4s^2 3d^1}$
Question 2: If my first thought is true, then do you write electron configurations for the p-block just like the d-block, with the $\ce{4s}$ orbital being the outermost one? Or do you follow the regular pattern of letting the $\ce{3d}$ block comes after the $\ce{4d}$ block?
For example, would it be like this $\ce{Ga = 1s^2 2s^2 2p^6 3s^2 3p^6 4s^2 3d^10 4p^1}$ or would it be like this $\ce{Ga = 1s^2 2s^2 2p^6 3s^2 3p^6 3d^10 4s^2 4p^1}$
According to google, if you search up "scandium electron configuration" it would say my first one). If you search up "gallium electron configuration", you would see my second one)