Density is Destiny
The shape depends on the curvature of spacetime.
The curvature of spacetime depends on density.
“Flat” corresponds to the “critical density”
~10-29 gm/cc, beyond which the
Universe  would recollapse.