The other answers so far deal with supporting Sagan's immortal "we are made of star stuff".
After accepting this assertion, the OP asks us to answer how this star stuff got into living beings. There are mechanisms for this. Many heavier elements are created in the last few moments of a star's life and dispersed throughout space in the star's supernova: the cataclysmic explosive output of energy from the production by fusion of the "starstuff" elements that make us up.
The Wikipedia Supernova Article has much relevant information, including descriptions of the nuclear processes that lead to the supernova (see also Here: Stellar Nucleosynthesis and here: Stellar evolution.
To answer the question about dispersal, it is important to heed the quantities of energy released. The following statements are relevant:
"....the total equivalent radiant energies produced by supernovae may briefly outshine an entire output of a typical galaxy and emit energies equal to that created over the lifetime of any solar-like star."
In other words, greatly above the gravitational binding energy of most of the system. This is important, because some of the "star stuff" in question lies in layers deep within the star. The huge abundance of energy means that even this deeply buried material can be accelerated to up to $0.1 \,c$. Thus, the material can easily escape gravitational binding of the star system and coast, over time, enormous distances through the universe. The energy thus enables a thorough mixing of stellar remnants throughout the universe.
Another, less violent, mechanism applicable to AGB Stars is the thermal circulation of carbon that "dredges" the carbon to the surface throughout the star's lifetime, where it is pumped into space by thermal pulsations and radiation pressure (hat tip to user Rob Jeffries for bringing this to my attention).
Thus interstellar gas and dust clouds, after enough time, contain a great deal of the heavier, "starstuff" elements. Thus the cloud that clumped into our Sun's accretion disk and protostar contained a great deal of these heavier elements, which thus found their way into the Earth and later gave rise to its biosphere.