Different shells can hold different maximum numbers of electrons. Electrons occupy shells starting with the innermost one. They begin to occupy the next shell when a shell becomes full.