We can only go by what the scriptures tell us and the scriptures are clear that Jesus was perfect.
Hebrews 7:26: Jesus was “holy, harmless, undefiled, separate from sinners, and made higher than the heavens.” Note he was “separate from sinners.” Sin means to “miss the mark” so a mistake or a sin are the same in the sense that they both are less than perfection. The sum of Jesus’ experiences until he was 12 years old are found in Luke 2:40 “And the child grew, and waxed strong in spirit, filled with wisdom: and the grace of God was upon him.” We then find that at the age of 12 he was able to “astonish” the learned rabbis in the temple Luke 2:41-50.
We have very little information about Jesus’s childhood. If this information was necessary to know for our faith, God would have directed it to be recorded. There are a few wild claims about Jesus and sometimes a movie is made around these claims. It is more for sensation and curiosity than faith building. We go by the scriptures. “To the law and to the testimony; if they speak not according to this word it is because there is no light in them” (Isaiah 8:20). We can have firm faith in a perfect Jesus. “Worthy was the lamb that was slain.” Revelation 5:12
Additionally, Jesus needed to be perfect to be mankind’s redeemer. In 1 Timothy 2:5,6 Jesus is referenced, “…the man Christ Jesus who gave himself a ransom for all to be testified in due time.” What does it mean to “give himself a ransom”? We are familiar with a ransom being paid when someone is kidnapped. A price is given in exchange for the person’s return. In the case of Jesus, he died as an exact substitute for Adam. His life was exchanged for Adam’s.
In the Greek (the original language of the New Testament) the word “ransom” is “antilutron” which means a “corresponding price.” Adam a perfect man died and Christ a perfect man died as his substitute. If Jesus had sinned in any way, He could not have been a ransom for Adam. 1Corinthians 15:21, 22 “For since by man came death, by man came also the resurrection of the dead. For as in Adam all die, even so in Christ shall all be made alive.”