The hydrogen molecule is the only one in which can not find an octet of electrons around each atom.
Let's evaluate each case.
1. Nitrogen (N₂):
With Z = 7, nitrogen has the following electronic configuration
2s² 2p³ → valence electrons
Since its valence electrons are 5, in the molecule one nitrogen atom shares 3 electrons with the other one, and each remains with an electron pair, so each atom has an octet of electrons.
2. Hydrogen (H₂):
With Z = 1, its electronic configuration is:
1s¹ → valence electron
In the molecule, the hydrogen atoms share the only electron they have, so they will have only 2 electrons around. In this diatomic molecule, we can not find an octet.
3. Oxygen (O₂):
Z = 8. Electronic configuration:
2s² 2p⁴ → valence electrons
In the diatomic molecule, each oxygen atom shares 2 electrons with the other one and remains with 2 pairs of electrons, therefore, each oxygen atom has an octet.
4. Fluorine (F₂)
Z = 9. Electronic configuration:
2s² 2p⁵ → valence electrons
In this molecule, each fluorine atom shares 1 electron with the other and remains with 3 pairs of electrons, hence, each fluorine atom has an octet of electrons around.
Finally, we can say that the hydrogen molecule is the only one in which can not find an octet of electrons around each atom.
I hope it helps you!