How do intermediate-mass stars primarily distribute elements like carbon and oxygen into space at the end of their lives?

Answer

By puffing away outer layers as planetary nebulae.

Intermediate-mass stars gently shed their outer layers, enriched with elements like carbon, oxygen, and nitrogen, into the interstellar medium by forming planetary nebulae.

How do intermediate-mass stars primarily distribute elements like carbon and oxygen into space at the end of their lives?
ElementstarastrophysicsFusionnucleosynthesis