I have read so many things.
I mean I have heard Council of Nicea in 325.
The earliest extant list of the books of the NT, in exactly the number and order in which we
presently have them, is written by St. Athanasius, Bishop of Alexandria, in his Festal letter # 39 of 367 A.D..
382 ad. Council of Rome at which Pope Damasus started the process of defining a universal canon for the Church. The New Testament books are listed in their present number and order.
393AD he Council of Hippo, which began "arguing it out." Canon proposed by St. Athanasius.
397AD The Council of Carthage, which refined the canon for the Western Church, sending it back to
Pope Innocent for ratification. In the East, the canonical process was hampered by a number of schisms (esp. within the Church of Antioch).
I guess there is no black and white answer with this. I am sure there is a true evolution of how it came to be. Anyone know how it truly came to be?