It all depends on the shell you’re talking about.
The first shell contains 2 electrons
Eight electrons are contained in the second shell
Eight electrons are contained in the third shell
The fourth shell is made up of 18 electrons
The fifth shell is made up of 18 electrons
32 electrons are contained in the sixth shell
32 electrons are contained in the seventh shell
It could also be 2, 8,18, 32 or the above… it all depends on the valency of which one has fewer free electrons.
Its general formula is 2n2
We hope you have understood the confusing issue.