Jesus was quoting the words in the law as Moses gave it to Israel. Jesus quoted those two sentences to the religious leaders who he was proving to be hypocrites. The quotes come from Exodus 20:12 and Exodus 21:17 and the men he was speaking to knew full well that Jesus quoted accurately (which is why the A.V. says 'curses father or mother', because that's what Exodus 21:17 says).
The point of Jesus quoting those adamant O.T. statements was to expose the hypocrisy of religious leaders who effectively turned a blind eye to offspring refusing to do their duty to their parents just because money had been given to the temple. ('Corban', verse 11 - it means 'Anything brought near to God'; in this case, money brought to the temple priests.) Because of their love of money, those religious leaders accepted it, irrespective of the offspring then cursing their parents - despite what the law said.
This was not about any death penalty. This was about both the religious hypocrites who loved money, and hypocritical offspring who were, in effect, giving them a bribe so as to get off the hook looking after their elderly parents. They knew they could treat their parents with contempt or even curse them, and the religious leaders would turn a blind eye.
Jesus knew what was going on and called them out. He knew that they were confident they could ignore the law of God, excusing themselves as having gained much money for the temple coffers by allowing offspring this loophole of Corban. He utterly condemned them as making the word of God of no effect by their traditions, such as that one of Corban. But he added that they had many other such vain traditions. He alighted on that particular one as an example that utterly exposed both parties.