You are correct in questioning who actually wrote the Matthew that has come down to us. The reason I said he is believed to have been the author is based on our earliest (ca. AD 125) patristic source of information, Papias of Hierapolis, who suggests that:
"Matthew compiled the Sayings in the Aramaic language, and everyone
else translated them as well as he could" (Eusebius, HE 3.39.16)
If the apostle Matthew, then gathered the saying of Jesus together in a collection, he would be the start of the gospel tradition. However, you are right in questioning since the Matthew
that has come down to us was written in Greek and no one has identified this author.