Both Matthew and Luke mention Jesus was born in the time of Herod, but Luke then (2:2) contradicts this and says that they went to perform the census when Quirinius was governor. The census under Quirinius took place in 6 AD after Herod had died in 4 AD.
“Now when Jesus was born in Bethlehem of Judæa in the days of Herod the king, behold, there came wise men from the east to Jerusalem.”
Matthew 2:1 (AKJV)
“There was in the days of Herod, the king of Judæa, a certain priest named Zacharias, of the course of Abia: and his wife was of the daughters of Aaron, and her name was Elisabeth.”
Luke 1:5 (AKJV)
“And this taxing was first made when Cyrenius [Quirinius] was governor of Syria.”
~King James Bible, Luke 2:2~