Helium atom has two electrons. The first electron occupies ‘1s’
orbital. The second electron joins the first in the 1s-orbital, so the electron
configuration of the ground state of ‘He’ is 1s2.
According to Pauli Exclusion Principle no two electrons of the same atom can have all four quantum numbers the same.
If n, l, and ml are same for two electrons then ms must be different. In the helium atom the spins must be paired.
Electrons with paired spins are denoted by ‘↑↓’. One electron has ms= +1/2, the other has ms= –1/2. They have anti-parallel spins.
The major consequence of the exclusion principle involves orbital occupancy. Since only two values of ms are allowed, an orbital can hold only two electrons and they must have opposite spins.
Hence, the electronic configuration of helium atom is:

As we pass from one element to another one of next higher atomic number, one electron is added every time to the atom.
The maximum number of electrons in any shell is ‘2n2 ’, where ‘n’ is the principal quantum number.
The maximum number of electrons in a sub-shell (s, p, d or f) is equal to 2(2l+1) where l = 0, 1, 2, 3… Thus these sub-shells can have a maximum of 2, 6, 10, and 14 electrons respectively.
In the ground state the electronic configuration can be built up by placing electrons in the lowest available orbitals until the total number of electrons added is equal to the atomic number. This is called the Aufbau principle (The German word “Aufbau” means “building up.”).Thus orbitals are filled in the order of increasing energy. Two general rules help us to predict electronic configurations.