Very shortly after the universe came into existence it inflated like a balloon and very quickly spread the matter around. But this inflation was brief and the universe continued to expand but not accelerate. So everything is fine, stars are being formed, and eventually, galaxies begin to coalesce and then galaxies huddled together and made galaxy clusters, and the objects in the version of the universe we know were born. So here is where things get weird.
All of this matter was gravitationally pulled toward each other, just as you’d expect the matter to behave. As a result of all of this matter clumping together, the expansion of the universe slowed down. But then suddenly around seven billion years ago, the expansion started to speed up and it’s only gotten faster since. Sometime between 11 billion years and seven billion years ago, dark energy turned on and began dominating the universe.