The Law is like a lamp: it brings light so that we can discern from darkness. But we must spend our time working in the light, rather than being fixated on the lamp itself. I mean, how useless would that be! But those who believe they can earn the favour of God through deeds, do.
Now we know that whatever things the law says, it speaks to those who are under the law, that every mouth may be closed, and all the world may be brought under the judgment of God. Because by the works of the law, no flesh will be justified in his sight. For through the law comes the knowledge of sin. But now apart from the law, a righteousness of God has been revealed, being testified by the law and the prophets; even the righteousness of God through faith in Jesus Christ to all and on all those who believe.