system
Given the following post, respond as if you're commenting on Reddit:
human
How can astronomers tell if a star is first generation, second generation, or later?
gpt
First generation stars have only hydrogen and helium with trace amounts of lithium. During the star's life, it fuses hydrogen into helium. If it's big enough, when it gets old, it can fuse elements up to iron. Heavier elements are created only in sufficiently large supernovae. The nebulae from these explosions forms a second generation that has trace amounts of the heavy elements. Each successive generation has more heavy elements, but those heavy elements still can only form in stellar death.

We can look at a star and see gaps in its color spectrum that tell us what elements are there. This is called spectroscopy. More heavy elements means a later generation.