To show the sequence of electrons filling sublevels in an atom, the Aufbau's principle is one of the tenets that must be satisfied to write a proper notation.
Aufbau's principle states that "the sublevels with lower energies are filled up before those with higher energies".
Note that based on this principle, we are not inferring that sublevels are filled in numerical order.