 Joseph and his family taught him how to learn these things. Whether you believe he's God or not, it is irrelevant. The true point is that Jesus had to learn things. He had to grow in wisdom. How do you grow in wisdom? There's no way you can grow in wisdom like Christ because people did made up all kind of stuff. You grow in wisdom like Christ by doing what he did. And you can also grow in wisdom.