"For if that first covenant had been faultless, then should no place have been sought for the second."James 1:25 called the "Law of Liberty" perfect, that is our New Covenant.
Christians point this out a lot addressing Soterology, Salvation by Faith Alone. But ignore it in Apologetics, feeling they need to defend every single imperfect part of the Torah's Civil Law code for Ancient Israel against modern skeptics. Instead of simply simply acknowledging that it was a Law Code written under God's guidance but still for imperfect people in an imperfect world.
So yes, it has a lot of problems when it comes to laws related to slavery and rape and virginity.
It does not deny the infallibility of God's Word to acknowledge that. The Masoretic Text of The Hebrew Bible remains a perfectly infallible record of what The Law of Moses was.