The gospels are from the apostles because the author say so. After the death and resurrection of Jesus, his ascension to heaven, and the descent of the Holy Spirit, the Church spread around the Mediterranean Sea. To learn the truth about the church, it is good to study the following: Papias of Hierapolis, Tatian... Catechism on the New Testament, with P. Flavien Andriamirijanirina.