Do you know that the writer of Hebrews actually said that there was something wrong with that Old Covenant?
It's right there in Hebrews 8.
But the problem wasn't the laws themselves. No, God found fault with the people.
Israel couldn't live up to those Ten Commandments. As a matter of fact they never got past commandment #1.
Of course God knew all along that Israel didn't have what it took to fulfill her end of the Mosaic Covenant, and neither do we.
That's why God promised a New Covenant
The day Jesus died. The old covenant gave way to the New. A covenant totally dependent on the person and work of Jesus Christ
And God has found no fault with Him.
As a believer in Christ, this New Covenant is yours.