Under his General Relativity theory, the universe should eventually collapse (under gravity). So he concocted the notion of an “accelerating” force to keep it static/stationary as scientists thought it was at the time. This was before Hubble and Co discovered that the universe was expanding, or in a state of “infinite deceleration” (prior to the comparatively recent discovery that the universe was/is actually accelerating in its expansion).
This has been the eternal battle between cosmologists. Whether the universe will collapse(the Big Crunch) or it will eventually continue expanding until the universe is filled with stellar copses and black holes. The other big battle is the age of the universe.