system
Given the following post, respond as if you're commenting on Reddit:
human
What caused protons and neutrons to come together in the early universe?

In the early universe, when the temperature was hot enough, there was a sea of protons, neutrons, electrons, and radiation (photons). Eventually as the temperature dropped, it became possible for protons and neutrons to come together and form atomic nuclei, though it was still too hot for electrons to bind and form neutral atoms. 

My question is - what caused the protons and neutrons to bind in the first place? If I understand correctly, the nuclear force keeps the nucleus together **once** it's already formed, but what caused the proton and neutron to bind? Why didn't all protons and neutrons continue as individual particles as the universe continued to cool?
gpt
You're talking about primordial nucleosynthesis. The first reaction in the chain is the production of deuterium:

p + n <-> d + γ

There's a photon so this is an EM process (electromagnetism mediates it). The subsequent processes to create helium and heavier elements contain both EM, weak and strong mediated reactions.

However, this first reaction cannot happen until the weak interactions are *decoupled*, i.e they've become weak, which happens when cooling below 1 MeV.

When they're active, there is this channel

p + e <-> n + ν_e

And permutations. At equilibrium you will find a certain ratio of protons and neutrons, given by the Boltzmann distribution and using the last reaction. At T=1 MeV the weak interaction decouples and this ratio is "frozen" at the value it had at 1 MeV.

Then a little time has to pass before we can start making deuterium. This is because we have a sea of photons messing with our stuff and decomposing our deuterium. We therefore need to wait for lower temperatures. In this small time neutrons decay. Remember that free neutrons are unstable with a 10 min or so half-life and they decay according to

n -> p + e + bar ν_e

So that when we get to making deuterium the neutron fraction is even lower.

All of this alongside a lot of boring calculations explains why not all of the hydrogen was fused into helium, which only forms a fraction of the total mass of baryonic matter today.