Sadaqah jariyah — the ongoing charitable gift — is the Islamic framework for legacy that continues to generate good after the giver's death: the well dug in a dry place, the knowledge shared that others carry forward, the good person raised whose goodness touches others in turn. The tradition names something real: that certain forms of giving create perpetual motion, releasing benefit into the world that does not stop when the giver does.
Each step builds on the last.