We say that the 4s orbitals have a lower energy than the 3d, and so the 4s orbitals are filled first.