There are two factors that can affect electron affinity. These are atomic size and nuclear charge. ... The smaller the atom is, the closer the outermost shell is; therefore, it is a stronger attraction between the nucleus and the incoming electron. That means the electron affinity is higher for smaller atoms.
Electronic configuration represents the total number of electrons that a neutral element contains. We add all the superscripts to know the number of electrons in an atom.
The electrons are filled according to Afbau's rule in order of increasing energies and thus the electronic configuration: