Things I have read so far talk about how the time of death is specific and does not change no matter what as it says in the Quran:
.....And no one’s life is made long or cut short but is ˹written˺ in a Record. That is certainly easy for Allah. [35:11]
So that means, that there is no need to pray for someone to have a long happy life, or to be cured of an illness because your prayers dont change anything? I used to go to this Islam Community thing and the woman there was talking about how when she was giving birth to her first son, she said there were lots of complications and everything, and how everyone thought he was not going to make it. But she said he did, because she had confidence in her prayers. But if the time of death was set, then there was no need for her to pray for him to live, because he would have anyway. Recently, I get this really horrible feeling that one of my close relatives is going to die (God forbid) im not going to say who because it will be even horrible if I type it out. Its a really terrible feeling and I even started crying today. I prayed for them to have a really long life, so will my prayer change anything? I am really scared of this feeling and I hope Inshallah that it means nothing and is just my brain.