The holy Prophet (saws) said: “When Allah wants good for His slave, He occupies him
with work.” The Companions asked, “And how does He occupy him with work?”
The Prophet ﷺ
said, “He grants him the ability and opportunity to do righteous deeds
before his death, then He takes his soul in that state.” (Ahmad)