When did Jesus know He was God? The short answer is we don’t know because the Bible doesn’t tell us. We are told in the Luke 2:39-52 that as a boy of 12 Jesus knew he was the son of God and must be “in his father’s house”.
I imagine that Mary and Joseph would have told and retold the stories from before and after Jesus’ birth; of the angels visits, Mary’s stay with Elizabeth and John the Baptist’s kick in the womb, the journey to Bethlehem for the census, about there being no room at the Inn, about being born in the stable including the sounds and smells, the shepherds visiting, living in Bethlehem, the star, the wise men coming to the house, the trip to Egypt to flee from Herod and the later move to Nazareth. We certainly know that Mary treasured all these things in her heart. Did she also tell him of the immaculate conception?
As a Jewish boy Jesus would have memorized a large portion of the scriptures. He would have read the passages in Isaiah and others that point to the coming Messiah. The Bible certainly comes alive to many of us as we discover new things in verses we have read before. Surely sometime reading through He would have had an inkling that those verses were about him.
I have a suggestion. And it is only me using my sanctified imagination. I suggest that Jesus didn’t just one day discover he was God, but rather that he likely felt that he always knew. I say that because I was adopted and I can tell you that I don’t remember a time when my parents sat me down and told me I was adopted as a baby. It feels to me like something I have always known. I think that may also have been true of Jesus. Something to consider.