The ten commandments were of the old law. Is "thou shalt not kill" obsolete?
To make this simple we must understand the laws of scripture. We have 4.
Moral ( transcendent and universal), ceremonial, judicial, and social compact law.
The ten commandments are moral law. As explained in Romans the moral law existed even in the beginning before the written law. They are transcending.
Ceremonial law has been completed in Christ. These are the laws that basically say you by law must sacrifice this type of animal.
Judicial is power under the government given by God to bring justice to the breaking of moral laws. The law never changes but our punishments may change. Example a horse thief probably would of been hung in the 1700s but same situation today they would face prison time. Still broke the law but punishment may change.
And social Compact law is basically a offset of laws from the moral laws like speed limits or the size of sidewalks. Both are to protect life and help stabilize a civilized society.
All moral laws are just as important in the NT as they was in the OT.
We just have to determine moral from ceremonial or the ancient nations judiciary punishment for breaking such crimes. Those are not under the new covenant.
We can still learn from that ancient nation but God has a different covenant for us to follow.