The Universe is vast beyond imagination, containing billions upon billions of galaxies. We have a pretty good handle on a lot of galactic dynamics, but how these colossal objects form, grow, and change is still something we're struggling to understand.

Enter the UniverseMachine: simulation software run on a powerful supercomputer, able to grow millions of universes so that cosmologists can study how they evolve over time.

We can learn a lot from observation and deduction, of course, but computer simulations are proving a powerful tool to help us fill in the gaps. Usually, they are used on smaller scales, but in this case, the researchers used the UniverseMachine to run through almost the entire timeline of our Universe - from around 400 million years after the Big Bang, right up until now.

"On the computer, we can create many different universes and compare them to the actual one," said astronomer Peter Behroozi of the University of Arizona. "That lets us infer which rules led to the one we see."

So that's what they did. Their simulation produced over 8 million universes, taking 400,000 CPU hours, with the researchers constantly tweaking the parameters to observe how these changes might affect the end result.

They found that the simulated universes most like our own real Universe all had similar physical rules.

And they also found that our understanding of star formation might be a littleā€¦ well, wrong.

It's believed that stars form when dense knots and wrinkles in gas clouds - like nebulae - collapse under their own weight, kicking off the stellar accretion process. But it's also believed that it has to be cooling gas; the hotter the gas, the harder it is for stars to form.

Evidence for this is thought to be found in the supermassive black holes at the centre of most galaxies. When these are active, they heat the stuff around them, something we thought was working to quench star formation even when gas was available.

This heating can also be produced by exploding stars. And dark matter - the mysterious unknown stuff adding gravitational mass to the Universe - is also thought to heat gas, so therefore it was thought that this played a role in preventing star formation, too.

But this is not what the researchers saw in their simulations.

"As we go back earlier and earlier in the Universe, we would expect the dark matter to be denser, and therefore the gas to be getting hotter and hotter. This is bad for star formation, so we had thought that many galaxies in the early Universe should have stopped forming stars a long time ago," Behroozi said.

"But we found the opposite: galaxies of a given size were more likely to form stars at a higher rate, contrary to the expectation."

When the team ran simulations with quenched star formation, the end result showed a universe quite different from the real one, with the galaxies the wrong colour: much redder than expected, due to a lack of younger, bluer stars.

But when the star formation didn't stop, the simulated universe looked a lot more like what we see with our telescopes and eyes.

"We are forced to conclude that galaxies formed stars more efficiently in the early times than we thought," Behroozi said.

"And what this tells us is that the energy created by supermassive black holes and exploding stars is less efficient at stifling star formation than our theories predicted."

Which, in turn, means we may need to go back to the drawing board to figure out how galaxies die.

The research has been published in the Monthly Notices of the Royal Astronomical Society.