Nobody knows the year of Jesus' birth and guesses range from 4 B.C.E. to 7 B.C.E. But that he was born before Herod the Great died is undisputed. Here are relevant comments about this tyrant from the New Living Translation Study Bible notes on Herod the Great (page 1578):
"Herod the Great was the Roman-appointed king of Judea (37-4 BC) at
the time of Jesus' birth (Mat. 2:1; Luke 1:5)... Born into an Idumean
(Edomite) family with links to the Romans, he rose to power by gaining
Roman favor and retained it by cruelly suppressing his opponents.
Herod was known for his large building projects, especially his
magnificent reconstruction of the Jewish Temple in Jerusalem, begun
20-19 BC (Josephus, Antiquities 15.8.1)."
Note that the Jewish historian, Josephus, mentions Herod and his Temple-building work, but says nothing about the massacre of the babies. That is not surprising, given that Josephus was not a Christian and wrote some time after the event of Matthew writing his gospel account. However, if the story had not been true and well attested, Josephus would have contested it. But there are references elsewhere, and Matthew Henry (died 1714) mentions some of them in his Commentary on the whole Bible, (page 1283). First he speaks of a tradition of the Greek church:
"(and we have it in the Aethiopic missal)" a "very absurd" number of
14,000 slain infants. "But it is an instance of the vanity of
tradition" which he discounts.
But Henry goes on to mention evidence of some substance, and I quote in full:
"Macrobius, a heathen writer, tells us that when Augustus Caesar heard
that Herod, among the children he order to be slain, under two years
old, slew his own son, he passed this jest upon him, That it was
better to be Herod's swine than his son. The usage of the country
forbade him to kill a swine, but nothing could restrain him from
killing his son."
Quoting again from the NIV notes on Herod:
"Caesar Augustus once said that he would rather be Herod's swine than
his son (a play on words in Greek since the two words sound alike -
Scant mention of the atrocity of having those infants under two years of age murdered is also unsurprising given the horrific nature of Herod's track-record of brutality. Such an event against despised, poor Jews would hardly compare (evil though it was) with these things Herod did - detailed by Henry:
"Herod was, throughout his reign, a bloody man. It was not long
before, that he destroyed the whole Sanhedrim, or bench of judges;
...Herod was now about seventy years old, so that an infant, at this
time under two years old, was not likely to give him any disturbance.
Nor was he a man over fond of his own children, or of their
preferment, having formerly slain two of his own sons, Alexander and
Aristobulus, and his son Antipater after this, but five days before he
himself died; so that it was purely to gratify his own brutish lusts
of pride and cruelty that he did this. All is fish that comes to his
net... It is probable that the blessed Jesus was at this time not a
year old; yet Herod took in all the infants under two years old, that
he might be sure not to miss of his prey."
Lack of mention in secular histories cannot be taken to mean this did not happen, but
if you can track down the record of Macrobius, you may get more details. Suffice to say that the enormity of Herod's wickedness was such, that the murder of babies stated by Matthew in his gospel would hardly raise an eyebrow, compared with his whole rulership track-record of evil deeds.