Is this correct?
Some actions can bring about death but those actions do not affect that godly will of God decreed on all His creatures called death. That expiry of life which time is not in the knowledge of the human being. Which can never be made earlier or later (through giving of charity and supplication) except by His will.
Death simply means our time is up. We don't choose the time. But we can, to a certain extent, choose how we end. The good ending ("husnul khotimah") is something Muslims must strive for and seek for from God The Almighty. "Allahumma aj'alna husnul khotimah" (Oh Allah grant us good ending). With our four hands and feet, how do we strive for a good ending? Through persistently doing good deeds.
A sweet yet inspiring song on coming to terms with death. Bila Tiba by Ungu.