Look at that nebula this are made of gas and dust!
it's protostar and that formed as gravity begins to pull the gasses together into a ball which this process is also known as accretion
And you know the protostar phase is the earliest one in the process of stellar evolution.
I just want to let you know the Main Sequence Stars fuses hydrogen atoms to form helium atoms in the stars core.
There is about 90 percent of the stars in the universe.
including the sun, are main sequence stars.
The explosion will cause a shock wave that will explode the outer layers.
As the fusion of iron requires more energy than it releases, therefore the core collapses and releases a huge amount of energy a explosion called Supernova.
To be exact if the stars core is between 1.5 and 3 solar masses it will become a tiny , very dense neutron star if it's grater than 3 solar masses than the core will contract to become a black hole!
if the core survives the supernova it can either become a neutron star or a black hole.