“For as many as are of the works of the law are under the curse: for it is written, ‘Cursed is every one that continueth not in all things which are written in the book of the law to do them. But that no man is justified by the law in the sight of God, it is evident: for, The just shall live by faith.” Galatians 3:10-11 (KJB)
From John Gill’s Exposition of the Bible on Galatians 3:11…
“But that no man is justified,…. There are some that are justified, as all God’s elect are, in his own mind and will from eternity; which will of his to justify them, upon the righteousness of his Son, undertook by him to bring in, is their justification in the court of heaven; and all that believe in Christ are openly and manifestly justified in the court of conscience, under the testimony of the Spirit of God: but no one is justified
by the law; it is in the Greek text, “in the law”; there were many justified before the law was given, as Noah, Job, Abraham, and all the Ante-Mosaic believers; and there were many justified “in”, or under the legal dispensation; but none of them were justified by their obedience to the law, but by the righteousness they believed they had in the Lord: especially no man is justified
in the sight of God; who sees the heart, knows the spring of actions, and whose judgment is according to truth; that is, by the law and the deeds of it, however they may before men:
it is evident; it is a clear case, out of all dispute, as appears from Hab_2:4
for the just shall live by faith; which may be read either, “the just by faith, shall live”: that is, the man who is just by faith, or justified by faith, not by it as a principle or act, or as the cause or matter of his justification, but by the object of his faith, Christ and his righteousness apprehended by faith, and so not just or justified by works; he shall live a life of justification, through that righteousness his faith receives; he shall live comfortably, with much peace and joy in the Holy Ghost, as the result of his being justified by faith; and shall live eternally, and never die the second death: or the “just shall live by faith”; he that is righteous, not by his own works, but by the obedience of Christ, shall live not upon faith, but by it on Christ, and his righteousness, which is revealed from faith to faith; and this makes it a clear point, that he is not justified by the law, for if he was, he would not live by faith on Christ, but in and by the deeds of the law.”
Since the law cannot save, and was never intended to save but rather to be a “school master” to show us our need of a savior. Points us to Jesus Christ as the Savior of all who will call on His name.
The Righteous and Just One became sin for us on the cross that we might be made the righteousness of God in Him (2 Corinthians 5:21). Jesus Christ died for our sins, was buried, and He rose again.