ظَهَرَ نَجْمٌ، ثُمَّ غَابَ النَّجْمُ وَرَاءَ السَّحَابِ.
A star appeared, then the star disappeared behind a cloud.
The first najmun introduces a new, indefinite referent. The later al-najm can be understood as anaphoric definiteness (ʿahd dhikrī), pointing back to the star already mentioned.
Repeating an indefinite noun could allow a different star to be understood. Definiteness thus helps manage reference and the order in which information becomes familiar to the listener.