The correct response is:
Stars form from dust and gas, so galaxies with younger stars typically consist of higher proportions of dust and gas than other galaxies.
This statement accurately reflects the relationship between star formation and the composition of galaxies. Younger stars are formed from the available dust and gas in a galaxy, so galaxies that are actively forming new stars typically have higher amounts of these materials. As stars age and eventually die, they can return some gas and dust back into the interstellar medium, but the formation of new stars requires a certain amount of dust and gas to be present.