Comparing nitrogen and oxygen
The fall in 1st ionisation energy from nitrogen to oxygen marks the start of electron pairing in p-orbitals of the 2p sub-shell
In nitrogen and oxygen the highest energy electrons are in a 2p sub-shell
In oxygen, the paired electrons in one of the 2p orbitals repel one another, making it easier to remove an electron from an oxygen atom than a nitrogen atom
Therefore the first ionisation energy of oxygen is less than the first ionisation energy of nitrogen