You can dedicate your entire life to the Law Covenant and works of righteousness and die in Hell…how can this be?
You can obey the Laws and edicts of God and man to the very best of your ability and work your fingers to the bone in philanthropy and die in Hell as your works, on your best day, are equated to a bloody menstrual cloth in God’s nose (Isaiah 64:6).
Not until such time you have FIRST established covenant relationship with the Father by faith in the Son, Jesus Christ, as your Lord (John 3) and you’ve received the Holy Spirit as Guarantor of that covenant relationship (Ephesians 1:13-14) will your works done in the Spirit be received by the Father as validation of the authenticity of your faith, but if Jesus is not your Lord, neither your prayers or your works of righteousness mean anything of eternal relevance to the Father (John 9:31).
You must FIRST do the will of God for your life; that is, BELIEVE in the One the Father has sent into the World to provide blood atonement for your sin (John 6:29). Until you’ve humbled yourself before the Father, acknowledged the truism that you’re a sinner in need of a Redeemer and sincerely believed in Jesus as your Messiah, Lord, Savior, you have no relationship with the Father (1 John 2:23) and you are an alien to the promise of the Father and you will ultimately perish in your sin and in Perdition (John 8:24; Galatians 2:16).