It’s complicated and cosmologists are not certain. One of the issues is only being able to see about 4% of the mass in the universe – the stars, planets, gas and dust. About 25% of the mass of the universe is Dark Matter. It’s “dark” because it doesn’t emit light that enables us to see it. Vera Rubin and Fritz Zwicky were the two astronomers who produced observations that led to the dark matter theory.
Vera Rubin measured star velocities in the Andromeda galaxy and plotted these against the star’s distance from the centre of the galaxy. Knowledge of rotational speeds within our Solar System would predict a graph similar to curve A. What she obtained was a relatively flat graph (B).
image from Quantum Diaries
The rotational speed of the stars in curve B are far too fast for the Andromeda galaxy to stay together. The only explanation for the galaxy staying together was the presence of an awful lot of additional mass that couldn’t be detected. This new mass was named dark matter.
Rubin talks about her discovery in this video.
Zwicky had been looking at clusters of galaxies, rather than individual stars within galaxies. He found something similar; the galaxies were swirling round at too great a speed and should fly apart. There had to be an awful lot of invisible mass in that part of space to produce a gravitational force strong enough to hold the cluster together.
There’s a further complication. The expansion of space appears to be caused by an unknown force called Dark Energy, that fights against the pull of gravity which should be reducing the rate of expansion.
Saul Perlmutter was awarded the Nobel Prize for Physics in 2011 for his work on Dark Energy. This video explains where we are in our understanding of where the universe will end up. It contains some similar footage from the end of the Vera Rubin video, so any déjà vu is real.