Recently, we constructed the specific solution to the second-order cosmological perturbation theory, around any Friedmann–Lemaître–Robertson–Walker background filled with dust matter and a positive cosmological constant. In this paper, we use the Cosmicflows-4 sample of galaxies from the Extragalactic Distance Database to constrain this metric tensor. We obtain an approximation to the local matter distribution and geometry. We numerically solve for null geodesics for randomly distributed mock sources and compare this model with the Lemaître–Hubble constant inferred from the observations under the assumption of perfect isotropy and homogeneity. We conclude on effects of realistic inhomogeneities on the luminosity distance in the context of the Hubble tension and discuss limitations of our approach.