There is an unequal number of elements in the periods in the Periodic Table.
Each period of the periodic table includes elements, which atoms have the same number of electron shells and orbitals. Atoms of the first period elements (H and He) have only one shell and one orbital – s-orbital. First period includes only 2 elements. Atoms of the second period elements (e.g., Li, C, O) have 2 shells and 2 orbitals – s-orbital and p-orbital. Second period have 8 elements. Atoms of the third period elements (e.g., Na, Al, S) have 3 shells and 3 orbitals – s-, p- and d-orbital. Third period have 8 elements too. But elements of fourth period have atoms with 4 shells and 4 types of orbitals – s-, p-, d- and f-orbitals. There are 18 elements in 4 and 5 periods. And so on. Why electrons form d- or f-subshell instead of occupy the next shell? Because they do not have enough energy to move to the next shell, as it has higher energy.