In Matthew 2, it makes it clear that Jesus was conceived during the reign of Herod and was a young child when Herod died.
After Herod died, an angel of the Lord appeared in a dream to Joseph in Egypt and said, “Get up, take the child and his mother and go to the land of Israel, for those who were trying to take the child’s life are dead.”
We know that Herod died in 4 BC, so we know that Jesus must have been born in 4 BC or shortly beforehand.
In Luke 2, it is made clear that Jesus was born during the census of Quirinius
In those days Caesar Augustus issued a decree that a census should be taken of the entire Roman world. (This was the first census that took place while Quirinius was governor of Syria.) And everyone went to their own town to register. ... He went there to register with Mary, who was pledged to be married to him and was expecting a child. While they were there, the time came for the baby to be born, and she gave birth to her firstborn, a son.
Quirinius became governor of Syria and performed his census in 6 AD. From this we know that Jesus must have been born in 6 AD.
This is a nine year discrepancy between the time of Jesus' birth as recorded by Matthew and the time of Jesus' birth as recorded by Luke. How can these two accounts be reconciled?