The order in which orbitals are filled in an atom is determined by the Aufbau principle, which states that electrons fill orbitals in order of increasing energy. However, it's important to note that the 4s orbital is not always filled before the 3s orbital.
The energy levels of orbitals in an atom are primarily determined by the principal quantum number (n). The 4s orbital has a higher principal quantum number (n = 4) than the 3s orbital (n = 3), indicating that it has a higher energy. According to the Aufbau principle, lower-energy orbitals are filled before higher-energy orbitals.
However, there are exceptions to this general trend when it comes to filling the orbitals. One such exception occurs in the case of the transition metals in the periodic table. For example, in the electron configuration of chromium (Cr), the 4s orbital is actually filled after the 3d orbitals. This is because the 3d orbitals have a slightly lower energy than the 4s orbital, making it more energetically favorable to fill the 3d orbitals first.
Similarly, in the electron configuration of copper (Cu), the 4s orbital is filled after the 3d orbitals as well. These exceptions occur due to the electron-electron repulsion effects and the specific electronic configurations of these elements, which lead to a more stable arrangement with the 3d orbitals being filled before the 4s orbital.
In most other cases, however, the 4s orbital is indeed filled before the 3s orbital, following the general Aufbau principle.