How does the life cycle of a star relate to the mass of the elements that it produces?
Initially, a star is mostly made up of hydrogen which keeps on fusing and producing a lot of energy in the form of heat and light.
In every star, the process of nuclear fusion takes place in which four hydrogen atoms combine to form a helium atom. When enough hydrogen atoms are converted to helium then fusion of helium atoms start and new elements are made in similar way.
The star begins to die when iron is produced in its core. All elements are produced in this way in a star.