The ten commandments are a priority, Jesus stressed often the need to not impede on those. Commandments were brought up a few times in the synoptic gospels. The most famous example was when he said that fantasizing about someone you’re not married to was (figuratively) as good as adultery. In another, he was asked why he was “working on Sundays” and he went out of his way to demonstrate how it wasn’t work in a laborious sense. The ten commandments do take priority over other teachings, that’s why they’re called the ten commandments and why, according to some, they were inscribed on stone while other rules were spoken orally.