Final answer:
Blue stars are young because they are very hot, massive, and have short lifespans of only a few million years. Galaxies that are blue in color indicate recent or ongoing star formation, while galaxies with a yellow or red tint house older stars from earlier star formation events that are now in longer-lasting main-sequence stages.
Step-by-step explanation:
Blue stars are typically young stars. This is because they are massive and hot, with much shorter lifespans than smaller and cooler stars. The color of a star is predominantly determined by its temperature, with blue stars being much hotter than red stars. When we observe the color of galaxies and notice that the blue color dominates, this suggests the presence of many hot, luminous blue stars, indicating that star formation has occurred relatively recently, within a few million years prior to the light reaching us. Conversely, galaxies that have a yellow or red hue tend to contain older stars because the young, blue stars have already ended their life cycle. The lifetime of a blue star is only a few million years, whereas red or yellow stars last longer in their main-sequence stage.
From observing distant galaxies, we understand that the universe is 13.8 billion years old and galaxies such as our Milky Way contain stars that could be as old as the Galaxy itself, up to 13 billion years old. Seeing blue stars or galaxies indicates ongoing or recent star formation, while older stars, which are red or yellow, denote regions where new stars have not formed for some time.