During the first four centuries of Christianity, from the beginning all Christians agreed on the four Gospels of St. Matthew, Mark, Luke and John. Beyond that, there was great disagreement as to which books should be read in the churches. St. Athanasius, a bishop, produced the first list of the present books of the Bible in 367 AD. Pope St. Damasus I, in his Decree of Damasus in 382 AD, repeated the same list of books. Then the Council of Hippo in 393 AD approved the same list. So did the third Council of Carthage in 397 AD. The Council of Carthage sent its list to Rome for ratification by Pope St. Boniface I. At that point, the Catholic Canon of Sacred Scripture was accepted worldwide.The Deuterocanonicals were also in the Scripture book that King James authorized. Why were they removed long after King James had died?
The councils you noted recognized the canon in existence but did not declare the canon.