Green and Wald long ago showed convincing results (I was convinced) that the homogeneity and isotropy of the FLRW metric for cosmology in GR had the nice property that local inhomogeneities averaged out: there is no significant effect or interaction between the local solution of GR and the global solution. this allows you to solve structure formation with a local approximate solution on a large scale FLRW background.
here are some folks challenging that view with an arXiv link embedded.
The Universe is inhomogeneous. Does it matter? | CQG+
i'm skeptical. the argument has the flavor of mathematical precision that might not be physically meaningful. others, including "you know who" are more open minded.