How are nebulae chemically related to the Interstellar Medium (ISM)?

Answer

Nebulae are localized, denser concentrations within the diffuse gas and dust of the ISM

Nebulae are not chemically separate entities; they are simply areas of higher density within the broader, more diffuse gas and dust that permeates the space between stars, known as the Interstellar Medium.

How are nebulae chemically related to the Interstellar Medium (ISM)?
SpaceastronomycompositionnebulaGases