Yes, it is true that stars form from dust and gas—specifically from vast clouds of hydrogen, helium, and other trace elements. These clouds, also known as stellar nurseries, collapse under their own gravity, leading to the formation of stars.
Galaxies with younger stars often have higher proportions of dust and gas compared to older galaxies. This is because younger galaxies are usually in the active process of star formation, which requires the presence of these materials. As stars live out their lifespans, especially the massive ones, they can contribute to the enrichment of the interstellar medium through processes such as supernova explosions, which disperse heavier elements into space. Over time, older galaxies tend to deplete their gas and dust reserves as they form stars and lose material to stellar feedback processes.
Thus, the composition of a galaxy is indeed related to the age of its stars. Galaxies with younger stars tend to be more irregular and have more chaotic star formation rates, while older galaxies, especially elliptical galaxies, often have less gas and dust and are composed mainly of older stars. These older galaxies can be considered 'red and dead' because they are no longer forming stars actively, while spirals and irregulars may still show significant star formation and contain a mix of old and young stars, correlating with their gas and dust content.
In summary, younger galaxies typically contain more dust and gas, which facilitates ongoing star formation, while older galaxies often have a higher proportion of aged stars and less interstellar material.