Nucleosynthesis is the process by which elements are formed in the cores of stars through nuclear reactions. This includes both stellar nucleosynthesis, which occurs during the lifetime of a star, and primordial nucleosynthesis, which occurred in the first few minutes after the Big Bang. Stellar nucleosynthesis involves the fusion of lighter elements into heavier elements, while primordial nucleosynthesis created the light elements hydrogen, helium, and small amounts of lithium and beryllium. Nucleosynthesis plays a crucial role in understanding the chemical evolution of the universe and the abundance of elements we see today.