The Scriptures do not tell us that Mary and Joseph told anyone that Jesus was the Son of God. When Mary was pregnant, she visited her cousin, Elizabeth, and Elizabeth recognized the unborn child as God's Son without being told. The holy spirit revealed this truth to her. Luke 1:39-45 (NKJV), “Now Mary arose in those days…and entered the house of Zacharias and greeted Elizabeth. And it happened, when Elizabeth heard the greeting of Mary, that the babe leaped in her womb; and Elizabeth was filled with the Holy Spirit. Then she spoke out with a loud voice and said, ‘Blessed are you among women, and blessed is the fruit of your womb! "But why is this granted to me, that the mother of my Lord should come to me? For indeed, as soon as the voice of your greeting sounded in my ears, the babe leaped in my womb for joy. Blessed is she who believed…’”
Even Jesus, Himself, did not go about declaring His position. It was God who revealed the truth about Jesus’s identity to Simon Peter. “He (Jesus) said to them, ‘But who do you say that I am?’ Simon Peter answered and said, ‘You are the Christ, the Son of the living God.’ Jesus answered and said to him, “Blessed are you, Simon Bar-Jonah, for flesh and blood has not revealed this to you, but My Father who is in heaven,’” Matthew 16:15-17.
Jesus knew He was God’s son when he was a child. When he was twelve years old, he called God His Father. “..they (Mary and Joseph) found Him in the temple, sitting in the midst of the teachers, both listening to them and asking them questions. And all who heard Him were astonished at His understanding and answers…And He said to them, ‘Why did you seek Me? Did you not know that I must be about My Father's business?’” Luke 2:46-47, 49.
God communicates directly with His perfect, sinless children. Adam was perfect and God talked with him in the Garden of Eden. (See Genesis 2:16 and 3:8.) Certainly, God cared for and tenderly loved Jesus throughout His life. As the best parent, God revealed to Jesus that He was His Father. Mary and Joseph were guided by God as to how to teach their precious child. The Bible does not give us any more specifics.