The Mosaic Law was the means in which God used in the Old Testament to separate and divide the saved people from the lost.
The Israelites which obeyed the Law of Moses received forgiveness, mercy and life (Lev. 18:5).
And those Israelites who disobeyed the Law; would receive death and puinishment if they did not repent and get right (Lev. 5:17).
Deuteronomy 6:4-9
Authorized (King James) Version (AKJV)
4 Hear, O Israel: The Lord our God is one Lord: 5 and thou shalt love the Lord thy God with all thine heart, and with all thy soul, and with all thy might. 6 And these words, which I command thee this day, shall be in thine heart: 7 and thou shalt teach them diligently unto thy children, and shalt talk of them when thou sittest in thine house, and when thou walkest by the way, and when thou liest down, and when thou risest up. 8 And thou shalt bind them for a sign upon thine hand, and they shall be as frontlets between thine eyes. 9 And thou shalt write them upon the posts of thy house, and on thy gates.
Deuteronomy 26:16-19
Authorized (King James) Version (AKJV)
16 This day the Lord thy God hath commanded thee to do these statutes and judgments: thou shalt therefore keep and do them with all thine heart, and with all thy soul. 17 Thou hast avouched the Lord this day to be thy God, and to walk in his ways, and to keep his statutes, and his commandments, and his judgments, and to hearken unto his voice: 18 and the Lord hath avouched thee this day to be his peculiar people, as he hath promised thee, and that thou shouldest keep all his commandments; 19 and to make thee high above all nations which he hath made, in praise, and in name, and in honour; and that thou mayest be an holy people unto the Lord thy God, as he hath spoken.
Scripture clearly teaches that the Mosaic Law could be kept and it was kept.
When an Israelite violated a law, the law had a provision in it where the guilty offender could offer the proper sacrifice for the infraction, and once the sacrifice was given, the offender received atonement and was forgiven and restored. Hence, by the offender following the Law's provision made for his past offense, he was once again keeping the Law. And thereby, securing his salvation.