Cosmos

After the first period of rapid expansion, the universe began to cool.

An excerpt from the article 25 facts about Cosmos

As the temperature dropped, subatomic particles and then atoms separated. The universe was filled with primordial matter – gaseous clouds consisting mainly of hydrogen and a small amount of helium and lithium. Under the influence of gravity, the first atoms began to move closer together and form denser clusters, giving rise to the first stars and galaxies.