When we talk about the "shape" of the universe. It is its intrinsic shape, not the embedding of the universe within a larger space.
It does make sense to talk about the intrinsic shape. Properties like "curvature" can be measured from inside a shape, you don't need suppose that the universe is "in" something to talk about its shape.
Now the space of the universe is three dimensional, this creates visualisation problems. So I'm going to first talk about an imaginary 2d universe:
A 2d universe could be flat, with a curved boundary (like a disc) Or it could be flat with no boundary (an flat infinte plane). Or a 2d universe could be intrinsically curved. If it has positive curvature it could be like the surface of a ball (positive curvature, finite with no boundary) Or shaped like a bowl (positive curvature) Alternatively it could have negative curvature: it could be shaped like a "Pringles crisp" These have negative curvature (this can happen with or without a boundary). Finally there could be regions with different curvature: positive in some parts, negative in others.
The same possibilities exist for our universe: It could be flat (with or without boundary) It could be positively curved (This is intrinsic curvature and your brain can't visualise this for a 3d shape) Or it could be negatively curved (again, don't try to visualise this for a 3d shape, you can't). In the case of positive curvature, it could be finite and unbounded, but for negative curvature, it must either have an edge, or be infinite.
So mathematically these are the possibilities. What does the science say?
We can measure the curvature on large scales. Our measurements are not perfect, there is some room for error. We measure the large scale mass/energy density of the universe, since curvature is caused by gravity, and gravity is caused by mass and energy. If the mass/energy density is > 1 then space would be positively curved. We actually find that the energy density is 1.00±0.02 That is the universe is either flat, or very nearly flat.
No there are profound problems with supposing that the universe has a boundary. But there are also problems with supposing it to be infinite. Scientifically, no edge has ever been detected. So when we build models of the universe, we will generally suppose to have no edge.
Thus our "best guess" is that the universe is uncurved and infinite.