What did Allah promise to the angel of death? When Allah tells the angel of death to take a soul the angel says “oh Allah I am at your service, to obey you is my duty. But the humans will hate me, they will always talk bad about me. When someone dies they will resent me”.
Allah replied “You carry out your duty, I will bring about circumstances in which no one will talk about you”. So when one talks about the cause of death they say a heart attack, an accident etc. they do not think about the angel of death.
Everything in life is predestined and that is one of the 5 pillars of the Islamic faith.