One molecule can be written three ways. A molecular formula counts atoms, an empirical formula gives the ratio, and a structural formula shows the bonds.
These are flat sketches, so the angles are only a hint. Real molecules sit in three dimensions. What the drawing does get right is which atom is bonded to which.