How are elements synthesized in lower-mass stars, like carbon, nitrogen, and oxygen, returned to the interstellar medium?

Answer

The outer layers are gently puffed away as a planetary nebula

In contrast to massive stars, lower-mass stars gently disperse their outer layers, which contain the elements they forged, into the surrounding space via a planetary nebula.

How are elements synthesized in lower-mass stars, like carbon, nitrogen, and oxygen, returned to the interstellar medium?
ElementastronomystarFusionnucleosynthesis