We are not saved by the law but we are convinced and convicted of our sin by the law. "For by the law is the knowledge of sin" (Romans 3:20).
The law was sent "that every mouth may be stopped, and all the world may become guilty before God" (Romans 3:19). "The law was our schoolmaster to bring us unto Christ, that we might be justified by faith" (Galatians 3:24).
The law is holy... and just, and good. Was then that which is good made death unto me? God forbid. But sin, that it might appear sin, working death in me by that which is good; that sin by the commandment might become exceedingly sinful
Paul was saying, "I couldn't really confess my sins until I knew they were sins. I couldn't seek after the holiness of God until I saw how far from Him I was. The law hit home to me, destroying my nonchalance about sin. When I saw God's holiness by His commandments, sin became utterly sinful to me."
That is the conviction that drives you straight to the arms of Christ, crying, "Mercy, Lord! I can't save myself, I can't fulfill Your law. I've seen the sin of my heart!"
Faith has been defined as "the flight of a convicted, repentant sinner unto the mercy of God in Christ Jesus." Only the person who has been convicted of his sins by the law of God will "flee to Christ" for refuge.
On the day of Pentecost Peter stood and offered the crowds the gospel of God's grace. But first he put them under the blazing light of the law. He pointed his finger and said, "Ye have taken, and by wicked hands have crucified and slain [Him]" Acts 2:23. The people were pricked in their hearts, so utterly convicted by the Word of God they cried out, "What shall we do?" verse 37
Adam was given the gospel of grace—after his "eyes were opened" (see Genesis3:7). It was only after he had seen his pitiful condition and the consequences of his sin that God brought to him the message of mercy and hope!