For the “Cliff Notes” version:
When the council of Hippo met in the 390’s AD, they had around 110 books to consider for the NT Canon. Some of them had been widely considered earlier in the Church’s life - Shepherd of Hermes, St. Clement’s letter to the Corinthians, and various others. Some of the books had not been considered inspired earlier on - the Letter to the Hebrews, Peter’s Epistles, Revelation, etc.
But the local councils of Hippo (circa 393AD) and Carthage (397AD) settled on the Canon that we use today. Pope Innocent in the early 400’s (407?) approved of these decisions.
The OT Canon followed the Greek Translation of the Hebrew Scriptures (called the Septuagint) for the most part. There may have been 5 or 6 books in the Septuagint that did not make it into our Canon (3 and 4 Maccabees, a couple of Esdra’s books, and a few more), but the rest of the books were considered part of our OT Canon.
Although there were a few exceptions, Catholics everywhere accepted these Canons as the official Canon. The most notable exception being St. Jerome, who was charged with translations the Greek Scriptures into Latin. Jerome acquiesced to the Pope decision and followed the Church’s Canon for his Latin Vulgate.
That was the Canon that the Church used, although it wasn’t binding, for the next 1100 or so years. Then the Reformation stirred up the Canon controversy, causing the Council of Trent to officially declare that the very same Canons that Hippo and Carthage settled on would be the Catholic Canon. There were no additions to the previous Canons accepted by the Church, as some people may have claimed.