In this case the angles in a triangle add up to less than 180 o . In this case the angles in a triangle add up to more than 180 o . Space in a flat universe which expands slowing down to a stop at infinite time is shaped like a 3-dimensional plane. In this case the angles in a triangle add up to 180 o . These three possibilities give the average shape of space.
Individual masses produce local bumps and troughs.
Of these possibilities the one corresponding to our universe is determined by the amount of matter in the cosmos. If there is very little the initial thrust from the Big Bang will never be stopped, if however there is a large amount of matter, the mutual gravitational pull will be sufficient to break the expansion and eventually cause a re-contraction.