Nitrogen molecule vs carbon-carbon triple bond stability
You might already know that elements like to follow the octet rule, which means that atoms tend to combine in a way that each atom can have eight valence electrons. Nitrogen can exist diatomically because through the triple bonds, each nitrogen will have one lone pair and three shared pairs. As seen in the picture, each nitrogen satisfies the octet rule.



Carbon, on the other hand, cannot satisfy the octet rule diatomically. Since carbon has one less valence electron than nitrogen, a triple bond would not work because the carbon does not have enough electrons to bond and satisfy the octet rule. It would leave each carbon atom with three bonded pairs of electrons and only one lone electron, giving each atom a configuration of only seven electrons per atom, not eight. Sorry I don't have a picture of a triple carbon bond. Hope this answers your question though!