I have read that a solution to the vacuum Einstein equation has a vanishing Einstein tensor, and therefore a vanishing stress-energy tensor. This means that there is no matter to generate spacetime curvature. If there is no matter to generate spacetime curvature, I assumed (apparently naively) that spacetime is flat.
But the Schwarzchild metric is a solution to the vacuum Einstein equation and is obviously not flat. For instance, one can calculate the deflection of light and Shapiro time delay which are obviously curvature effects. Moreover, the Schwarzchild metric describes spacetime outside a spherically symmetric mass $M$ and so there is necessarily some mass present.
How does one reconcile the fact that the Schwarzchild metric depends explicitly on a mass $M$ yet is also a solution to the vacuum equations? More generally, how can solutions to the vacuum Einstein equations have curvature if "mass tells spacetime how to curve"?