The earliest source is Papias. He is cited by Eusebius (See
Ecclesiastical History 39.16).
The phrase in Greek is very ambiguous.
Here is the first half of the sentence.
Ματθαῖος μὲν οὖν Ἑβραΐδι διαλέκτῳ
τὰ λόγια συνετάξατο.
τὰ λόγια = the words, the sayings (It does not say Gospel).
συνετάξατο - is a verb and could be understood to mean "compose," however it does not necessarily need to be understood in that sense. As you can see below such an understanding is not required (see red highlight citation below).
View attachment 1348
A Greek-English Lexicon of the New Testament and Other Early Christian Literature, 3rd Ed., p. 974
While it by no means impossible that Matthew composed a Gospel in Hebrew there is zero physical evidence. No early source cites such a Gospel\document, and there is no manuscript evidence.
Now a few other church fathers do pass on the same kind of information found in Papias but is likely they are simply following the tradition.