Nitrogen on Earth is a great mystery, in the sense that it is unique in the solar system. Indeed, the isotope of terrestrial nitrogen does not correspond to the one of the sun or the other planets.
Nitrogen represents about 78% of the earth’s atmosphere when oxygen has only a proportion of 20.9%.
According to a 2013 article in Nature magazine, terrestrial nitrogen comes from the tectonic activity of the plates.
The other rocky planets have no nitrogen because they have no tectonic plates.
Before, the scientists thought that it was due to certain asteroids that bring the nitrogen on our planet during its first billion of years.