The question you're asking touches upon the origin of matter and the elements in the context of the Big Bang theory, which is the prevailing scientific explanation for the early stages of the universe. According to this theory, the universe began as an extremely hot and dense singularity, often referred to as the initial point or the primordial state.
During the first moments of the Big Bang, the universe underwent a rapid expansion known as cosmic inflation. As the universe expanded and cooled, the energy present in the early universe began to convert into matter and various fundamental particles. In the intense heat and energy of the early universe, subatomic particles such as protons, neutrons, and electrons formed.
Shortly after the initial expansion, the universe had cooled enough for protons and neutrons to combine through a process called nucleosynthesis, forming the nuclei of light elements such as hydrogen and helium. This occurred within the first few minutes of the universe's existence. The synthesis of heavier elements required the intense heat and pressure found within stars and later in stellar explosions, such as supernovae.
Over billions of years, the process of stellar nucleosynthesis led to the creation of progressively heavier elements through fusion reactions within stars. Elements like carbon, oxygen, nitrogen, and others were formed in the cores of stars through nucleosynthesis processes. These elements were then distributed back into the universe through stellar processes, including supernova explosions.
The formation of complex elements and molecules necessary for life, such as those found on Earth, often requires additional processes beyond stellar nucleosynthesis. These processes include stellar winds, planetary accretion, and chemical reactions occurring within stellar nurseries like nebulae.
In summary, the matter and elements we observe in the universe originated from the intense energy of the early universe during the Big Bang. Through subsequent processes such as nucleosynthesis within stars and stellar explosions, a wide variety of elements and complex matter were formed, eventually leading to the conditions necessary for the existence of life as we know it.