However, an electron in a higher shell is shielded from the nucleus by electrons in lower shells. This means that each lower-shell electron cancels one unit of positive charge for electrons in higher shells. To a first approximation, we can neglect electron-electron repulsion as a contributor to ionization energy, because the electrons are zipping around each other so fast that, on average, electrons are just as likely to be pushed toward the nucleus as away from it by any other electron in the same shell . For the first example, consider lithium. Therefore the ionization energy of lithium is rather low, only 5 eV. Now consider beryllium.
Beryllium has four protons and four electrons.
However, since the inner shell can hold only two electrons, beryllium has two electrons in its valence shell, and each valence electron sees two units of positive charge. The dip at oxygen is because one of the 2p electrons is being forced into a p orbital with another electron.