Big Bang Nucleosynthesis
From t=1-200 sec the Universe had about the density of water and a temperature of about a billion degrees. Protons and neutrons froze out of the radiation field (fewer neutrons because they are a little more massive), and neutrons began to decay. There were 14 protons for 2 neutrons. The neutrons fused to make deuterium, and then helium. This left 12 protons and 1 helium (He4), or about 8% He by number or 25% helium by mass. Just as we see everywhere today! A little bit of deuterium and lithium was also left, and we see that too. The exact density of those then determines the amount left today (so we know what it was).