IE=The ionization energy (IE) is qualitatively defined as the amount of energy required to remove the most loosely bound electron, the valence electron, of an isolated gaseous atom to form a cation.
In Nitrogen, 2p subshell is half filled, thus making it slightly stable, while in Oxygen, in 2p subshell one electron gets paired up, so it's easy to remove electron from that orbital due to repulsion.
Due to slight repulsion in one of the orbitals(since there are paired electrons) in Oxygen, it's easy to remove one electron from it, so the 1st ionization energy in oxygen is slightly more than nitrogen, which is slightly stable due to Hund's half-filled rule.