The Bible teaches that God's grace through faith in Christ alone saves, not works. Those who believe that their works will save them will not be justified; only faith in Christ saves. The Old Testament chronicles Israel's continual breaking of the Law God gave them and falling into apostasy
(Exodus 32:7–8; Judges 2:11–13; Nehemiah 9:26). God knew this and promised a "new covenant" in which His law would be in the hearts of His people
(Deuteronomy 31:20–21; Jeremiah 31:31, 31:33; cf. Ezekiel 36:26-27). The New Testament makes it clear that God's grace through faith in Christ alone saves
(Romans 10:9-10, 11:6; Ephesians 2:8-9). Those who do not believe this are not placing their faith in Christ and therefore will not be saved. The book of Galatians is devoted to dispelling the false gospel of a works-based righteousness. The simple truth is that we can't save ourselves, but that Jesus can save us if we place our faith in Him.
Peanut butter tastes better with jelly, macaroni is even more delicious with cheese, and rice is twice as nice with beans. Some things are better when we add more to them.
But the gospel isn't one of those things. We are saved by God's grace through faith in Christ alone—not grace plus works.
The more ignorant we are of that truth, the more we're likely to fall into legalistic beliefs. That's because before we know Christ, pride in self guides us. (After all, we're so much better than "them"). But Jesus said, "No one is good except God alone" (Mark 10:18). The truth is like the fluorescent light in a clothing store dressing room: it has a way of exposing our flaws. The more we realize God's holiness, the more we understand Isaiah's reaction when he glimpsed it: "Woe is me! For I am lost; for I am a man of unclean lips, and I dwell in the midst of a people of unclean lips; for my eyes have seen the King, the Lord of hosts!” (Isaiah 6:5).
If you're still prone to thinking you're scoring points in heaven with good works, open the Bible. Study it daily. Reflect on its truths. You'll find yourself more grateful each day that you're saved by grace alone.