The Gospel according to Matthew in the New Testament is attributed to Matthew (note we do not know for sure). He never says that he is the author and the historical records are not what you would call primary sources. There are over one hundred Greek manuscripts of the Gospel. Whoever wrote the Gospel of Matthew, took 90 percent of Mark’s Gospel. That’s why some scholars believe that Mark was written first, and maybe the author of Matthew was not an eyewitness. He also recorded about 60 sayings from the Gospel of Luke. What is new in the Gospel of Matthew are the parables. (Wayment, p1)

Reference

Wayment, Thomas A. The New Testament, A Translation for Latter-Day Saints, A Study Bible.        Religious Studies Center, Provo, Utah. 2019.