Romans 7:2, 6-7
2 For example, by law a married woman is bound to her husband as long as he is alive, but if her husband dies, she is released from the law that binds her to him.
6 But now, by dying to what once bound us, we have been released from the law so that we serve in the new way of the Spirit, and not in the old way of the written code.
7 What shall we say, then? Is the law sinful? Certainly not! Nevertheless, I would not have known what sin was had it not been for the law. For I would not have known what coveting really was if the law had not said, “You shall not covet.” [Exodus 20:17; Deut. 5:21]
The passage is showing that just as a wife is “released” from the law of her husband when he dies, even so, through the death of Christ, people were “released” from the obligations of the Mosaic law. That the law here contemplated is the law of Moses, including the Ten Commandments, is demonstrated by the reference to the tenth commandment in Romans 7:7.
As Paul later will argue that if a man receives one portion of the law [as binding for justification], he is a debtor to do all of it:
3 Again I declare to every man who lets himself be circumcised that he is obligated to obey the whole law.
As I shared elsewhere regarding the law of Moses,