This says most of earth’s nitrogen was present when earth formed. The nitrogen cycle eventually leads to atmospheric nitrogen which can be stripped by solar winds except earth has a magnetosphere that shields us. So planets with no or a weak induced magnetosphere lose nitrogen. Earth does not.