so the Apostle John lived the longest,
Polycarp was a disciple of John the Apostle, so he had first hand knowledge of what John taught.
Irenaeus was a disciple of Polycarp, so by 180 AD (basically two generations?) Irenaeus was preaching out of most of the 27 books we have in our New Testament.
-------
you got these guys who were taught by the Apostle John, and then they started hearing all this crazy talk, so they figured they had to make a list of was REALLY scripture, and what was not, and so by 180 AD, they were making a list (the "canon") of what was acceptable to be taught.
so Irenaeus, who was taught by Polycarp, who was taught by John, who was taught by Jesus, began defining the Bible we use today.
----
the basic tests for what were allowed were:
1) it had to come from an Apostles who had seen Jesus.
2) or, it had to come from an associate of an Apostle.
(Mark learned from the apostle Peter, and Luke wrote what Paul did)
3) does it follow the teachings of Jesus & the Apostles?
those three are usually all that is mentioned, but this link has some more:
https://www.biblicaltraining.org/blo...anon-scripture