For the believer, Scripture's comfort is direct: to be absent from the body is to be present with the Lord. You don't earn your way into that. You are held by Christ on both sides of death.
The Grace Answer
Underneath this question is usually a tender fear, either about your own death or about someone you have already lost. Scripture meets that fear with remarkable directness for the believer, and its comfort does not depend on you having lived well enough to qualify.
Paul, facing the real possibility of execution, wrote that he was torn between staying to help the church and departing, “having a desire to depart and be with Christ, which is far better.” He did not describe death as drifting into nothing or waiting in some anxious limbo. He described it as being with Christ, and he called it better. Elsewhere he says it plainly: we are “well pleased rather to be absent from the body and to be present with the Lord.” For the one who belongs to Jesus, the distance between last breath and His presence is not a chasm to fear.
Held on both sides
Remember what Jesus told the dying criminal beside Him, a man with no time left to reform or earn anything: “Today you will be with Me in Paradise.” Today. With Me. That is the whole gospel compressed into one sentence at the last possible moment. The man's assurance was not his record. It was Christ's word and Christ's presence.
Christians have discussed the finer mechanics of the state between death and the final resurrection, and good believers hold slightly different views of the details. But the anchor is not in dispute and it is what your heart actually needs: if you belong to Jesus, death does not hand you over to the dark. It hands you into His presence. The same grace that holds you now holds you straight through. You do not have to earn that arrival or hope you were good enough at the end. The One who carried you through life carries you through death, straight into His presence.