Name me one that was there please.
Mary, Jesus’ mother, was still living when Matthew wrote his account and would have gotten her firsthand eyewitness testimony. Luke says he interviewed eyewitnesses in his account which may have included Mary. There may have been other eyewitness who saw the birth of Jesus that we are unaware of.
Many historical accounts of famous people were written by people who weren’t physically present but interviewed people who were.