Compare the flashlight with the two light bulbs. The fluorescent tube and street lights contain glowing gases. The coating around these lights spreads out the spectrum, but you can still see bright lines. These bands are the characteristic fingerprint of the gases which make the spectra. Mercury vapor produces bright green and purple lines.
Sodium vapor produces bright yellow lines.
The spectrum of a red star has more light at the red end of the spectrum. The spiral arms of our Milky Way Galaxy are filled with clouds of glowing gas. Predict how the spectrum from one of these glowing clouds might look.