The cosmos made its first atoms only after 380,000 years of fog
For its first few hundred thousand years the universe was an opaque glowing plasma, too hot for electrons to settle around nuclei. Around 380,000 years after the Big Bang they finally did, light broke free, and that ancient flash still reaches us today as the cosmic microwave background.
Cosmologists trace the story back 13.8 billion years to inflation, the earliest phase with observational backing, when space ballooned exponentially in a sliver of a second. When inflation stopped, its energy turned into particles and radiation, leaving a dense, searing plasma: the hot Big Bang. From then on the universe cooled as it grew, and because the expansion rate itself depends on which particles are around, cosmology and particle physics became deeply entangled.
Things moved quickly. A process called baryogenesis left a slight surplus of matter over antimatter; most pairs annihilated, leaving that small remainder plus a flood of radiation. After about one second, neutrinos stopped interacting and began streaming freely, creating a neutrino background that still fills space. Some five seconds later, electrons and positrons wiped each other out, dumping their energy into the remaining plasma. Within three minutes it was cool enough for stable nuclei to form, yielding hydrogen, helium and a pinch of lithium. Dark matter is usually assumed to have appeared by then, though nobody knows how.
After atoms formed and the sky turned transparent, gravity took charge. Clouds of gas collapsed and heated until fusion lit the first stars, and over millions of years galaxies and larger structures assembled. Roughly nine billion years on, dark energy overtook matter as the dominant influence, and the expansion began speeding up, as it still does now.
All of this is pieced together from old light. A distant galaxy is seen only as it was when its light departed, and the ongoing expansion stretches that light towards redder wavelengths during the trip. Measuring this redshift against known spectral lines reveals how far away the source lies. Because direct evidence before nucleosynthesis is scarce, many researchers propose modified early timelines, and some offer alternatives to inflation that still reproduce the large-scale structure seen today.
Source: Chronology of the universe