What little I remember about dark energy (and I'm not even an astronomy/physics student so take this with a grain of salt) is that it's basically a hypothesis for explaining why the universe is expanding and accelerating despite the fact that you'd assume gravity would be trying to contract it, or at least decelerate it. The way it "works" is that it's a constant energy in all of spacetime, so for a while it was actually weaker than gravity, but as the universe kept expanding gravity became less powerful due to its dependence on distance, but dark energy stayed unchanged because it's constant, so it got to the point where dark energy was more powerful than gravity in terms of expanding/contracting the universe, and as it continues to expand gravity will only become weaker in comparison.