How does N in NF3 obey octet rule

as usual, google is your friend. See

chem.libretexts.org/Bookshelves/General_Chemistry/Book%3A_ChemPRIME_(Moore_et_al.)/07Further_Aspects_of_Covalent_Bonding/7.01%3A_Exceptions_to_the_Octet_Rule

To determine how the nitrogen (N) in NF3 obeys the octet rule, we need to understand what the octet rule states. The octet rule states that atoms tend to gain, lose, or share electrons to achieve a full outer electron shell, typically consisting of eight electrons.

Nitrogen (N) normally has five valence electrons, represented by its electron configuration: 1s2 2s2 2p3. To achieve a full octet, it needs three more electrons. In the molecule NF3, nitrogen forms three covalent bonds with three fluorine (F) atoms. Each shared bond consists of one electron from nitrogen and one electron from fluorine.

The shared electrons in the NF3 molecule provide nitrogen with a total of eight electrons around it, fulfilling the octet rule. This is because each bond contributes two electrons to the shared electron count, and adding the three bonds will give nitrogen a total of six electrons from the shared bonds.

Additionally, nitrogen has two lone pairs of electrons, which are not involved in bonding. These lone pairs contribute two more electrons, bringing the total to eight.

In summary, each nitrogen atom in NF3 forms three covalent bonds with fluorine atoms, and it also has two lone pairs of electrons. This arrangement allows nitrogen to achieve an octet of electrons around it, satisfying the octet rule.