Einstein’s general relativity explains the structure of spacetime. It requires three space dimensions, one time dimension, and a scale factor that describes how the separation between space points can expand or contract depending on differing matter/energy conditions in the universe. The spacetime of Einstein is something called a Riemann manifold which is fully described by its internal metric and does not require it to be embedded in anything. In other words, it can expand or contract without needing to be expanding or contracting into something. It doesn’t say it can’t be expanding into something, but means that is not a requirement. So, until we know differently, best to go with the simplest idea.
As for how existence came into being, there are lots of theories but no evidence. The theories range from vacuum fluctuations in an eternal quantum vacuum to colliding branes from m-theory. It is likely that none are correct and we may need to wait for the holy grail of physics, a TOE (theory of everything).