Here's why:
* Precursor to a star: Nebulas are vast clouds of gas and dust. Gravity can pull these materials together, causing them to collapse and heat up. Eventually, this process leads to the birth of a star.
* Remains of a star: When a star exhausts its nuclear fuel, it can explode as a supernova, leaving behind a nebula called a supernova remnant. This remnant contains the ejected material from the star's core and outer layers.
So, a nebula can be both the birthplace and the graveyard of stars.