The principle that matter cannot be created or destroyed is a fundamental concept known as the law of conservation of mass (or equivalently, the law of conservation of energy in the context of mass-energy equivalence, as described by Einstein's famous equation E=mc²). This principle states that the total amount of mass (or energy) in a closed system remains constant over time.
While matter cannot be created or destroyed within a closed system, it is believed that all the matter in the universe originated from a highly energetic event called the Big Bang. The Big Bang theory is the prevailing scientific explanation for the origin and evolution of the universe.
According to this theory, the universe started from an incredibly dense and hot state, often referred to as a singularity. At this initial moment, the universe was filled with a tremendous amount of energy, and as the universe rapidly expanded, this energy transformed into various particles and fields.
As the universe cooled down, particles such as protons, neutrons, and electrons formed. These particles eventually combined to form atoms, and through processes like nucleosynthesis in the early universe and stellar fusion in stars, more complex elements were created, such as hydrogen, helium, and heavier elements like carbon, oxygen, and iron.
Over billions of years, through stellar evolution and processes like supernovae, these elements were dispersed throughout the universe, leading to the formation of galaxies, star systems, and eventually planets like our own.
So while matter cannot be created or destroyed within a closed system, the origin of all matter in the universe is ultimately traced back to the initial conditions of the Big Bang and the subsequent processes of cosmic evolution.