Your honest prayer touches the deepest longing of every heart, to be safe not just now but forever, and to be on the right side of eternity when this life ends.
God hears that desire and He has answered it in Jesus Christ. The Bible makes a distinction that helps here. From a human point of view death is the separation of our consciousness from our body. From a spiritual point of view real death is separation from God. Jesus came to deal with that second kind of death so that the first kind would hold no terror for His children.
Scripture says the wages of sin is death, and that sin is the sting that makes death fearful. Jesus, who was made a little lower than the angels for a time, tasted death for every person. He suffered being forsaken so we would never have to be. On the cross He took our sin upon Himself, and through His death He broke the power of the one who had the claim of death over us. Because of that, Satan has no rightful claim any longer over anyone who belongs to Jesus.
That is why the Bible says He came to deliver those who through fear of death were all their lives held in bondage. Many people live their whole lives in that bondage, afraid of what comes after. But for the child of God that fear is removed. Paul, who faced constant danger for the sake of Christ, was not troubled because he understood this. He could say, O death, where is your sting, O grave, where is your victory, and then give thanks to God who gives us the victory through our Lord Jesus Christ. Sin has been removed for the believer, so the sting is gone.
To be kept safe always, even when you die, is to be kept in Christ. The promise is not that we will avoid physical death, for unless the Lord returns first our path in this life will one day lead through the valley of the shadow of death. The promise is what the psalm says, though I walk through that valley I will fear no evil for You are with me. He leads us in paths of righteousness for His name's sake, and He stays with us through the valley itself. For the one who is in Christ there is never a moment of separation from God, not in life and not in death.
This is also what it means to be a citizen of the kingdom of heaven. An earthly citizenship gives certain rights and protections, but citizenship in God's kingdom is far greater. Wherever you go you have His protection and His authority over your life, and that citizenship continues beyond this life into His presence. That is the better side you prayed about, to be at home with the Lord, in the place of light and life that He has prepared.
That safety and that home are not earned by how much we pray or read or give or serve. Those things matter, but they do not make us righteous. Righteousness comes only through faith in Jesus, who makes us clean and presents us as righteous before God. When we trust Him as Lord and Savior we pass from death into life by the work of the Holy Spirit because of what Jesus has done.
If you have not yet put your trust fully in Jesus, you can do so now in simple faith. Tell Him you know you are a sinner, that you believe He died for your sins and rose again, and that you want Him to be your Lord and to forgive you and keep you. He will receive you, and then you can know with assurance that you are kept safe now, kept safe when you die, and kept safe forever on the other side, present with Him.
I will pray that God gives you that assurance and takes away all fear, that you will know deeply that nothing can separate you from His love in Christ, and that whether in life or in death you are held securely in His hand.