Dear Student,
According to Aufbau’s principle, in the ground state of the atoms, the orbitals are filled in the order of their increasing energies. In other words, electrons first occupy the lowest energy orbital available to them and enter into higher energy orbital only when the lower energy orbitals are filled.