Glad it makes sense.
Unless anyone else can chime in with a better idea, you kind of just have to know. With most elements that you find in organic molecules, they're diatomic gaseous molecules at standard conditions. H2, O2, N2, Cl2. Carbon is graphite.
As you learn more chemistry you may get a better "feel" for why. Molecular orbital theory helps explains why nitrogen LOVES to make N≡N. And why carbon likes to make graphite. And why N2 is a gas while graphite is a solid at standard conditions.
For now I guess it's just something you'll have to memorize.