General Relativity successfully establishes that the presence of mass distorts this, so it defines a mathematical object (the Einstein tensor) that reacts to the distribution of mass and energy and precisely describes the changes to the metric. For example it can model how the mass of the sun distorts the space so that light from distant stars appear to follow a curved path because very close to the sun a curved path is now the shortest path.
The Einstein tensor defines how distances --and time-- are measured and it's the best mathematical model that we have about what "space itself" is. Future theoretical advances could take us forward and demonstrate that space itself emerges from other more fundamental elements, but this needs bridging quantum mechanics and gravity. We don't really know what space is made of, but scientists have precisely modelled how it reacts to mass (and energy) with utmost precision.
NB: At cosmic scales the exercise becomes more difficult, as there is an expansion of the metric of spacetime that is not due to the presence of mass, in fact it is caused by the _absence_ of mass as it seems to be due the energy of empty space: the phenomenon called Dark Energy.
Hope this helps!