Final answer:
Shells closer to the nucleus fill first because electrons are attracted to the positively charged protons in the nucleus, therefore lower energy shells that are closer to the nucleus get filled before higher energy shells that are farther away.
Step-by-step explanation:
Shells closer to the nucleus must fill first. According to the Bohr model of the atom, the electron shells are arranged with increasing energy levels as we move away from the nucleus. Electrons are attracted to the positive protons in the nucleus, which implies that an input of energy is necessary to move them away from the nucleus. Therefore, lower energy electrons, which reside closer to the nucleus in the lower-energy shells, will fill these shells first before filling the higher-energy shells that are further away from the nucleus. This is due to the nuclear charge felt by the outermost electrons, where principal shells with larger values of 'n' lie at successively greater distances from the nucleus. In the electron configuration of an atom, you will often see that the shells fill in order, starting with the lowest value of 'n', or the s subshell, progressing then to the p subshell, and so on.