An extremely comprehensive treatment of the historical position and evolution of this issue from the Catholic Church perspective is here. It is impossible to summarise it in this space without copying from there in extenso. Some remarks:
Christology argues that Jesus has two natures, namely divine and human. Therefore, theologians have differentiated between Jesus' divine knowledge and human knowledge. While the former is assumed to be infinite, the latter does not need to be so. Several NT texts shows a Jesus either ignorant of certain things, e.g. date and hour of End of Times, Mark 13:32:
But about that day or hour no one knows, not even the angels in heaven, nor the Son, but only the Father.
or learning through life, e.g. Luke 2:52, in the context of Jesus as a boy aged 12:
And Jesus grew in wisdom and stature, and in favor with God and man.
The conclusion from the article is that the view of Jesus's human knowledge and its relation to his divine knowledge has varied over times. In fact, in the Catholic Church, there is no explicit dogma about it (as far as I know).
The current version of the Catechism expresses the official position of the Catholic Church in the matter (not very explicit, as you can see), in numbers 472-4:
472 This human soul that the Son of God assumed is endowed with a true human knowledge. As such, this knowledge could not in itself be unlimited: it was exercised in the historical conditions of his existence in space and time. This is why the Son of God could, when he became man, "increase in wisdom and in stature, and in favour with God and man", and would even have to inquire for himself about what one in the human condition can learn only from experience. This corresponded to the reality of his voluntary emptying of himself, taking "the form of a slave".
473 But at the same time, this truly human knowledge of God's Son expressed the divine life of his person. "The human nature of God's Son, not by itself but by its union with the Word, knew and showed forth in itself everything that pertains to God." Such is first of all the case with the intimate and immediate knowledge that the Son of God made man has of his Father. The Son in his human knowledge also showed the divine penetration he had into the secret thoughts of human hearts.
474 By its union to the divine wisdom in the person of the Word incarnate, Christ enjoyed in his human knowledge the fullness of understanding of the eternal plans he had come to reveal. What he admitted to not knowing in this area, he elsewhere declared himself not sent to reveal.
(see associated footnotes in catechism page)
I finish with the conclusion from the aforementioned article:
The picture that emerges from these data points is of a shift away from the medieval consensus and a return to streams of thought found among the Church Fathers.
Our own age is like theirs in that orthodox theologians are split. Some, such as von Balthasar and Ratzinger, have held Christ’s human knowledge was more restricted than the previous consensus did. Others, such as the late Father William Most, defend the more expansive understanding of Christ’s human knowledge.
The latter is still a possibility, for the Magisterium has not condemned that view. At the same time, there has been a marked shift in the way the Magisterium treats the subject, as illustrated in the Catechism, the audiences of John Paul II, and the approval of the PBC and ITC documents we’ve reviewed.
If advocates of the traditional position are still free to propose their view, they cannot count on the support of the Magisterium in the same way or advance their arguments as if nothing has changed.