Actually, no one knows how it was done.
Is just only gravity or other causes that led to the curvature of space and what’s more with such an effect that entire universe is actually completely twisted in itself.
So maybe that’s why these famous examples such that starting from any point of the universe, we always return to the starting point.
So all this simplifying if we moved with great speed trying to reach to the ends of the universe following the fleeing galaxies (carried by force of expansion space), because without any doubt it is destination of their travel we not see the boundaries of our universe but only we’ll return to the starting point… Milky Way.
But the fact that science can prove that the boundaries of the universe doesn’t exist as a result of assumptions that space is curved absolutely doesn’t mean that the universe itself as a specific area in which this is done the crazy dance of our universe isn’t a part of other area, about differing properties, partly or entirely from ours. and i aren’t considering the idiotic Multiverse theory.