You might think most matter in the universe is in galaxies-- either stars or intra-galaxy gas that could form into stars. However, 80% of baryonic (non-dark) matter is actually in the intergalactic medium (source: GPT-5.6 Sol citing Dev et al and other studies) far from any galaxy, and another 14% is in the circumgalactic medium and near galaxy clusters.
This means the cosmic endowment is 4x larger if we can economically recover hydrogen and helium from the "filaments" and "sheets" between galaxies, 5x if we can harvest voids too. This gas is extraordinarily thin: the cosmic mean density is just 0.25 protons/neutrons per cubic meter vs 100+ in the CGM. I am fairly convinced it's possible according to known fundamental physics [1], but it's an open question whether the engineering closes.
If it does, then 80% of future civilization's resource collection will consist of vast numbers of slow magnetic scoop collectors trawling the empty cosmos for one proton at a time, assembling enough mass for one Jupiter-sized blob every ~5 million cubic light years trawled. They could send the artificial planets very slowly back to a galaxy, or perhaps they will throw the mass into rotating black holes in situ, to power computers.
[1] Most of the low-redshift IGM is ionized, so some kind of electromagnetic scoop is in theory feasible.
Reservoir
Fraction of all baryonic matter
Stars and stellar remnants
4.5%
Inside galaxies, but not stars—mostly ISM gas
1.5%
CGM and other halo gas, including intragroup/intracluster gas
14%
IGM at above-mean density—mostly filaments and sheets
65%
IGM at below-mean density / voids
15%
Total
100%