The life cycle for a particular star depends on its size. The diagram shows the life cycles ... Nebulae are mostly composed of hydrogen. Gravity begins to pull the dust and gas together.