After the photons decoupled from the matter, and the nuclei started combining with the electrons, we reach the era of atoms. The initially hot atoms slowly assembled and cooled into protogalactic clouds. The first galaxies formed by about 1 billion years, which marks the end of the Era of Atoms and the beginning of the Era of Galaxies:
The Era of Atoms (380,000 years – 1 billion years or so) began as the universe finally cooled and expanded enough for the nuclei to capture free electrons, forming fully-fledged, neutral atoms. Previously trapped photons were finally free to move through space, and the universe became transparent for the first time. These photons have been passing through space ever since, forming the cosmic microwave background. The expansion since the origin of the universe has redshifted the initially energetic photons to microwave wavelengths. The CMB also marks the furthest point back in time we can observe — the time before is sometimes referred to as the dark ages.