Period 1 of the periodic table contains 2 elements ($1s^1$ and $1s^2$).
Period 2 contains 8 elements ($2s^1$, $2s^2$, $2p^1$, $2p^3$, ..., $2p^6$).
By the same argument, period 3 might contain 18 elements ($3s^1$, $3s^2$, $3p^1$, $3p^3$, ..., $3p^6$, $3d^1$, $3d^2$, $3d^{10}$). Why does period 3 of the periodic table contain 8 elements instead of 18?
I think that it could be explained by means of atomic stability, but I need help to understand what happens.
Thank you in advance.