How it cooled down what couldn’t be hotter
Immediately after the Big Bang, the universe was a hot and dense mixture of actively interacting quarks and leptons. In a second, their density and kinetic energy, i.e., their temperature dropped so much that quarks have merged into hadrons whereas, for example, neutrinos ceased ‘to notice’ other particles. After five minutes, nuclei of the lightest atoms have been formed of stable hadrons (nucleons). Through hundreds of thousands years, the temperature has dropped to a few thousand degrees, so that the nuclei became capable of holding electrons in their orbits, i.e., plasma turned into gas, mostly the hydrogen and helium. The gravitational attraction was gradually increasing density inhomogeneities in the gas, preventing their expansion, so galaxies and stars have started to be formed of the inhomogeneities.