This work examines the connection between Chemistry and Astronomy, showing how the chemical composition of matter is the result of cosmic evolution. Primordial nucleosynthesis produced only the lightest elements, while successive generations of stars synthesized heavier elements through nuclear fusion. Supernovae explosions and Neutron Stars mergers dispersed these elements into the interstellar medium, enabling the formation of chemically enriched stars and planetary systems. The Sun is discussed as a second-generation star whose composition reflects this cumulative process. Finally, the study considers the future evolution of the Sun and the fate of the Earth, highlighting that planetary systems and their chemistry represent temporary stages in the continuous evolution of matter in the Universe.