Final answer:
Older stars burned most of their hydrogen and helium through stellar nucleosynthesis, involving nuclear reactions that form new elements and enrich subsequent star generations.
Step-by-step explanation:
The process by which older stars burned up most of their hydrogen and helium throughout their evolution is called stellar nucleosynthesis. This is a series of nuclear reactions that occur in stars and are responsible for the creation of new elements. Specifically, stars with masses higher than about 8 solar masses can fuse elements as heavy as iron. The late stages of a star's evolution, during which it exhausts all available energy supplies, can result in the ejection of matter enriched in heavy elements into space.
This matter can then contribute to the formation of new stars, leading to each succeeding generation of stars containing a larger proportion of elements heavier than hydrogen and helium. This process of star formation and element enrichment demonstrates how the atoms on Earth and in our bodies are the products of past stellar generations.