Hello.
Athanasius produced a list of the NT books in 367.
(Lindberg, Carter (2006). A Brief History of Christianity. Blackwell Publishing. pp. 15.)
The local Council of Rome, where Catholics tell me their pope and the magisterium defined their canon was in the year 382.
*(Ibid. pp. 15) *
How could Athanasius know what the NT was 15 years prior to the Pope and the Magisterium telling him?
He was the bishop of Alexandria. He did not speak for the whole Church. He spoke for Alexandria under the authority of Rome. As such, he did not have complete the entire canon of scripture until Rome had spoken fifteen years later. Where did he dictate his canon of the NT to the universal Church? He did not and could not.
[Council of Ephesus (Universal Council)] - "For your blessedness is not ignorant that the head of the whole faith, the head of the Apostles, is blessed Peter the Apostle…Peter, prince and head of the Apostles, pillar of the faith, and foundation of the Catholic Church, received the keys of the kingdom from our Lord Jesus Christ, the Savior and Redeemer of the human race, and that to him was given the power of loosing and binding sins: who down even to to-day and forever both lives and judges in his successors. The holy and most blessed pope Coelestine, according to due order, is his successor and holds his place, and us he sent to supply his place in this holy synod, which the most humane and Christian Emperors have commanded to assemble, bearing in mind and continually watching over the Catholic faith. For they both have kept and are now keeping intact the apostolic doctrine handed down to them from their most pious and humane grandfathers and fathers of the holy memory down to the present time. "
Tertullian
“For though you think that heaven is still shut up, remember that the Lord left the keys of it to Peter here, and through him to the Church, which keys everyone will carry with him if he has been questioned and made a confession [of faith]” (Antidote Against the Scorpion 10 [A.D. 211]).
“[T]he Lord said to Peter, ‘On this rock I will build my Church, I have given you the keys of the kingdom of heaven [and] whatever you shall have bound or loosed on earth will be bound or loosed in heaven’ [Matt. 16:18–19]. . . . Upon you, he says, I will build my Church; and I will give to you the keys, not to the Church” (Modesty 21:9–10 [A.D. 220]).
The Letter of Clement
of Alexandria to James
“Be it known to you, my lord, that Simon [Peter], who, for the sake of the true faith, and the most sure foundation of his doctrine, was set apart to be the foundation of the Church, and for this end was by Jesus himself, with his truthful mouth, named Peter, the first fruits of our Lord, the first of the apostles; to whom first the Father revealed the Son; whom the Christ, with good reason, blessed; the called, and elect” (Letter of Clement to James 2 [A.D. 221]).