God gave the moral law in the Old Testament for the purpose of showing people their sins, and to provide a sacrifice for sins. The animal sacrifices were a symbol of Jesus’ sacrifice for sins.
Some people became very dedicated to the law and thought they were righteous. (Pharisees)
Others would completely rebel against the law, thinking at least that was honest and agreed with their true nature.
Still others become slackers, seeing the truth of the system and refusing either of these options.
The successful hypocrites show the world only the positive sides of their true nature, so a person who puts on a fake face, the public morality, nice clothing, good behavior, good performance, has a whole host of inner or private things that are not being shown to the public.
Their life becomes an acting job of external righteousness and purity. These people, because they are rewarded financially and socially for their success, start to buy their own image. They start to think that all of their sins and bad motivations which people don’t generally see, don’t count for anything.
But God will punish them for their sins if the do not have Christ as Savior. Their fake external display of righteousness doesn’t fool God.
The other thing is that, quite often, these people explode in egregious acts of immorality and wickedness, or despair into suicide, because the emptiness, dishonesty, dissatisfaction, and inhumanity of the hypocrisy becomes to much.
But there is a fourth option…
God’s purpose in giving the law was not to find a do-it-yourself way to righteousness and Heaven, but rather to show people their need for a Savior from the punishment of sin, and also from sin itself, that was pre-figured in the animal sacrifices.
Believing in Jesus does two things. One, it applies the death-for-sins sacrifice of Jesus on the cross to you: to forgive all of your sins, past, present, and future.
Two, the person who believes in Jesus can live in the world by the Spirit of Christ, so now the person has a real righteous identity in Christ (not self-righteousness) that is his as a gift of God’s grace, and also he can live empowered and guided by Spirit of Christ, which dwells in his new self, given to him by God’s grace, not relying on his sinful flesh to produce sins or good works.