At the time of the Big Bang, the universe was extremely hot and dense. The primary constituent of matter during this early phase was a hot plasma of elementary particles, including quarks, leptons, and their antiparticles. The universe was too hot for quarks to combine and form stable particles like protons and neutrons. This hot plasma was essentially a soup of particles, including quarks.
As the universe expanded and cooled down, a process known as Big Bang nucleosynthesis occurred. During this phase, which lasted for a few minutes after the Big Bang, the conditions became favorable for the formation of light elements such as hydrogen (the simplest and most abundant element), helium, and trace amounts of lithium and beryllium. The vast majority of matter in the early universe was indeed in the form of hydrogen nuclei (protons) and helium nuclei (alpha particles).
The formation of heavier elements, including iron, occurred through stellar nucleosynthesis. Stars, particularly massive ones, are responsible for synthesizing elements through nuclear fusion reactions in their cores. As stars undergo fusion, they convert hydrogen into helium and progressively fuse helium into heavier elements like carbon, oxygen, and ultimately iron.
So, while the early universe consisted of a plasma of particles, including quarks, it later transitioned into a mixture of hydrogen and helium as the dominant elements. The creation of heavier elements like iron primarily took place within stars through stellar nucleosynthesis processes.