Until around , neutron/proton conversion reactions maintained equal numbers of protons and neutrons, but then the balance shifted towards the lower energy state represented by the protons (still the equilibrium ratio). This reached a 7-to-1 ratio in favour of protons by a temperature of , after which there was no further neutron/proton conversions and the ratio was frozen, except for the decay of neutrons on a half-life of about 15 minutes.
Almost every neutron from this time ended up in helium. For every two neutrons needed for helium, there were 14 protons. Two of these also ended up in helium, with 12 left over for hydrogen. Thus a 12:1 ratio of hydrogen to helium atoms resulted, equivalent to 25% helium by mass. This is the helium abundance seen in all stars regardless of the abundance of other elements. The independence of helium from the other elements is difficult to explain if helium is also made mostly in stars, although of course they do contribute to some extent.
In order to get to helium, deuterium had to be made first via
However at first the reverse reaction maintained a very low abundance of deuterium, which could not build up until , by which time the photons were of too low an energy to break it down. Had this not occurred, and there had been more neutrons around, then a much larger fraction of the total mass may have ended up as helium, and the Universe would be very different.
Once deuterium did form, it was rapidly mopped up into helium, although a little was left (about 0.00002 by mass). Other than hydrogen (as 1H and 2H) and helium ( 4He), 3He and lithium were primarily produced during the Big Bang. All other elements (except beryllium which has an uncertain status) were cooked up in stars. In fact deuterium and lithium are easily destroyed in stars, as they are the first particles to fuse as a star heats up. Thus the best measurements come from distant quasars before much processing in stars has taken place.
Finally, I note that it is the delay in the formation of deuterium that also prevents the formation of heavier elements because by the time helium is formed, it is too late to fuse carbon, oxygen etc.