Under law means, without Messiah, legalistic, looking to works alone for justification before Yah, everyone fails this because no one can keep all 600+ commands without fault. Paul had this spirit before his encounter with Messiah on the road to Emmaus, and this is what Paul is talking about by legalism. Knowing the law, living by it, but not realising who the law was pointing too, i.e Yahshua Hamashiach.
When we come to faith in Messiah, the “New Covenant” is written in our hearts, this is a new agreement between Yah and mankind, where Yah’s laws remain the same, but the agreement between Yah and man (Heb ch8) extends to us more grace for our transgressions because the covenant is mediated by a new priest, i.e. Yahshua Hamashiach.Therefore, it is not “the law of sin and death” as previously under the old covenant, where when we sinned we must die, but rather instead it is “the law that gives life”, because our high priest empathises with out infirmities in order to lead us to repentance, rather than judge us for sin leading to a life of hopelessness and death. Let’s not give credibility to interpretations of scripture that are leading many astray.