If John the Baptist was the greatest of all those born of women, then he was greater than Moses, Elijah, the Prophet Isaiah, and the Prophet Daniel. He was the representative of all mankind. He was the spiritual High Priest who would pass our sins onto Jesus Christ. He was the last prophet of the Old Testament era. When John the Baptist baptized Jesus, all the sins of the entire world were passed onto Jesus, and Jesus fulfilled all the righteousness of God by accepting each and every sin of the whole world.
“Permit it to be so now, for thus it is fitting for us to fulfill all righteousness” (Matthew 3:15). By receiving the baptism given by John the Baptist, Jesus fulfilled all the righteousness of God. Just as the High Priest in the Old Testament had passed the sins of his people once and for all by laying his hands on the head of the sacrificial lamb, so did John the Baptist pass all the sins of this world once and for all onto Jesus by laying his hands on His head and baptizing Him. It’s through this baptism that Jesus Christ took upon all the sins of the world. It is by receiving this baptism from John the Baptist that Jesus bore the sins of the world.
https://www.bjnewlife.org/en/sermons/sermonsDetail.php?idx=9012&findLang=English