The Prophet (ﷺ) said: A man giving a dirham as sadaqah (charity) during his life is better than giving one hundred dirhams as sadaqah (charity) at the moment of his death.
Sunan Abi Dawud Book 18, Hadith 5