A jail keeper in Philippi asked, Sirs, what must I do to be saved? (Acts 16:30). This all important question must be answered before you die.
The one true and living God has communicated with us through His eternal Word, the Holy Bible. The words of the LORD are pure words: as silver tried in a furnace of earth, purified seven times (Psalm 12:6). He has told us that He is holy and that He despises sin. I am holy (1 Peter 1:16). For thou art not a God that hath pleasure in wickedness: neither shall evil dwell with thee (Psalm 5:4). This presents a problem for us, seeing we are all under sin. For there is not a just man upon earth, that doeth good, and sinneth not (Ecclesiastes 7:20). As it is written, There is none righteous, no, not one (Romans 3:10). This sin that we have personally and knowingly committed against God has alienated us from Him. But your iniquities have separated between you and your God (Isaiah 59:2). And you, that were sometime alienated and enemies in your mind by wicked works (Colossians 1:21). This separation between the sinner and God continues even after death. Sinners that die in their sin go to the lake of fire. And whosoever was not found written in the book of life was cast into the lake of fire (Revelation 20:15). God does not love, overlook, or accept the sinner with his sin. God judgeth the righteous, and God is angry with the wicked every day (Psalm 7:11).
God does not want the sinner to perish, nor does the sinner have to. Our loving God showed his love in the grandest way possible. For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life. For God sent not his Son into the world to condemn the world; but that the world through him might be saved (John 3:16-17). But God commendeth his love toward us, in that, while we were yet sinners, Christ died for us (Romans 5:8). Since our sin was the problem and sin must be dealt with by a holy, righteous, and just God, God gave His Son, Jesus Christ, to be our substitute. The Lord Jesus Christ died, not for His own sin, for He had none, but for the sin of the whole world. Who his own self bare our sins in his own body on the tree (1 Peter 2:24). For he [God] hath made him [Jesus Christ] to be sin for us, who knew no sin; that we might be made the righteousness of God in him (2 Corinthians 5:21). Jesus Christ took the sinner’s place and died the death the sinner deserves. On the third day after His burial, He rose from the dead and is alive today seated at the right hand of the heavenly Father. I am he that liveth, and was dead; and, behold, I am alive for evermore, Amen; and have the keys of hell and of death (Revelation 1:18). Jesus paid in full the sinner’s debt of sin. He, therefore, is the way to have forgiveness of sins and eternal life.
So what must the sinner do to have eternal life and be forgiven? The good deeds you do are absolutely worthless to gain merit before God. But we are all as an unclean thing, and all our righteousnesses are as filthy rags (Isaiah 64:6). For by the works of the law shall no flesh be justified (Galatians 2:16). The only merit you can claim is the merit of the Lord Jesus Christ. You must recognize your desperate need before God. You must turn to God from your sin, trusting in His Son, Jesus Christ, as your sin bearer. Believe on the Lord Jesus Christ, and thou shalt be saved (Acts 16:31). Merely believing in God or facts about the Bible, religion, etc. will not suffice. You must place your heart’s complete faith, trust, and confidence in the Lord Jesus Christ to be your very own Savior. But to him that worketh not, but believeth on him that justifieth the ungodly, his faith is counted for righteousness (Romans 4:5). Baptism, church membership, good works, sacraments, doing your best, will not do. Jesus said, I am the way, the truth, and the life: no man cometh unto the Father, but by me (John 14:6). If you desire to trust in Jesus Christ to be your Savior, you can call out to Him, confessing your need and receiving Him. For whosoever shall call upon the name of the Lord shall be saved (Romans 10:13). But as many as received him, to them gave he power to become the sons of God, even to them that believe on his name (John 1:12). Why would you not place your faith and trust in the Lord Jesus Christ to be your Savior even now? Why would you bear your own sin when Jesus has already paid the price for your forgiveness? For the wages of sin is death; but the gift of God is eternal life through Jesus Christ our Lord (Romans 6:23)