Answer:
The temperature increases in the center of a nebula, and nuclei begin to fuse.
As the nuclear fusion sets off a chain reaction, the nebula gets hotter and brighter and turns into a star.
The star stays in the main sequence stage for a long time.
The star runs out of hydrogen and turns into a planetary nebula or a supernova, depending on its mass.
Heavy elements are created when the supernova explodes.
The temperature increases in the center of a nebula, and nuclei begin to fuse.