On the authority of Abu Hurairah (RA) that the Messenger of Allah (SAW) said, ‘When a person dies, his deeds come to an end except for three: Sadaqah Jariyah (a continuous charity), or knowledge from which benefit is gained, or a righteous child who prays for him’. (Muslim)
Sadaqah Jariyah an ongoing charity. Sadaqah Jariyah continues to benefit the recipient(s) for a long time.
You will receive countless rewards for a single donation, even after you have passed away. You can even give on behalf of a deceased loved one, as they will continue to gain reward from it for as long as people benefit from it.