True, Jesus agreed with every bit of God's Law.
But the Law was a contract of God with the Jewish nation, not Gentiles and so Gentiles were not obligated o keep Jewish law. Deut 5:2
Jesus said he came to fulfill the law and fulfill it he did. So what does this help us understand?
Jesus came and kept the commands of the law but to fulfill the law completely he had to make the teachings of the prophets come true, his coming was a guarantee that their prophecies concerning all things were fulfilled.
Some of these prophecies included the future restoration of the earth to a paradise Psalms 37:11,
The granting of everlasting life Ps 29;
Bringing in global justice 72:1-8,
And the blessings to all the nations Ps 72:16-19.
Through the prophet Jeremiah, Jesus would also fulfill the law which involves bringing in a "new covenant" Jer 31:31-34
And because of Jesus all the nations were going to be blessed Gen 22:18
By presenting himself for baptism, Jesus really fulfilled the words of “the Prophets,” just as he said.
The apostle Paul indicates some of the prophecies Jesus fulfilled, in Hebrews 10:5-10, Heb 8:6
Jesus reveals a new covenant the night before his death.
Under new divine arrangements, which now included Gentiles, God had this written:
"do you not know that unrighteous people will not inherit God’s Kingdom? Do not be misled. Those who are sexually immoral, idolaters, adulterers, men who submit to homosexual acts, men who practice homosexuality,... will not inherit God’s Kingdom.
And yet that is what some of you were."
God made provisions for anyone who wanted to do God's will, and do as he commands to have a share in the blessings.
The verse concludes by saying:
"But you have been washed clean; you have been sanctified; you have been declared righteous in the name of the Lord Jesus Christ and with the spirit of our God." 1 Cor 6:9-11