God alone determines the state of those who have died physically, telling us that their bodies rot in the grave until the Day of Resurrection and Judgment, when every one who has died will be raised from the dead in a new resurrection body that God has made fit for the eternal state. Their invisible, spiritual part is elsewhere, awaiting that day when it will be 'clothed' in that new body, to then stand before the Great White Throne, for judgment. That is the orthodox Christian teaching. No human who is alive can do anything to affect the eternal resting in peace of the deceased. However, quite a few Christians disagree with that, thinking they can actively help their departed loved ones to eventually 'merit' getting a place in heaven. But I'm not here to go into that as I want to stick to what the Bible says to answer your question. The Bible has Jesus giving an account of two Jewish men who died, and their very different experiences with their spiritual part. He answers your question. It's in Luke's gospel chapter 16, verses 19 to 31. The rich man died and found himself in torments in hell. The beggar who sat at his gate died and found himself carried by angels to bliss in "the bosom of Abraham". The formerly rich man cried to his Father Abraham for mercy due to the flame, to have the former beggar sent down to cool his tongue with some water. But Abraham said the beggar was now comforted [obviously at peace] while he was in torments. There was a great chasm between the two, which could not be crossed. So the rich man begged for Lazarus to be sent to Earth to warn his brothers of the terrible torments he was now in, so they could avoid ending up there when they died. Abraham said that they had Moses and the prophets - to listen to those ones. The response to that? "Nay, father Abraham: but if one went to them from the dead, they will repent." Abraham's response in turn was, "If they hear not Moses and the prophets, neither will they be persuaded, though one rose from the dead." Consider what Jesus was warning us of - Moses and the prophets are in the Old Testament part of the Bible. The prophet greater than Moses, who rose from the dead three days after crucifixion, is alive today, still warning us who read his words in the New Testament that he is the only assurance of resting in peace when we die, if we have found peace with him, through total faith in what he did to save us from the judgment we deserve. Only then can we experience the peace Jesus gives to believers in him. It's not the peace that the world gives - read John 14:27 & 16:33. Those who confess their sins and put faith in Christ, and in no-one or nothing else - experience that peace before they die. But not due to anything they do - entirely due to what Christ has done to deliver them from the condemnation of their sin. This proves, from Jesus' own lips, that no human who is alive on Earth can do anything to affect the eternal state of the deceased. If they are in torments when they die, before the Day of Resurrection and Judgment, they will experience that for eternity. Read Revelation chapter 20 verses 4 to 15. The Bible is your best source of information on this topic. It will require hours of diligent, prayerful study to sort out this huge topic but I have directed you to a good starting point (Luke 16) and the conclusion of the matter (Revelation 20).