“When exactly did “the Church” make a dogmatic declaration of what the canon of Scripture was?”
In the East I don’t believe it was ever done as a truly dogmatic matter. Certainly no Ecumenical Council ever decided such a thing. Local councils decided what would be used for local or regional churches. My memory is that Trent did define the canon for The Church in the West, but I could be wrong on that.
I think this is because the Scriptures were widely recognized from the beginning. It was only when large movements developed that written declarations of what comprised Scripture were made. For example, confronted with a growing gnosticism St. Athansius made a written declaration of what the canon was as the bishop in Alexandria.
Another example is the Muratonian Fragment which dates back to 170 AD. It follows the Marcion movement.
Sometimes in the rush to take credit for something we fail to recognize how seriously Christians of the Apostolic Era and the century immediately following considered these matters. They knew who the Apostles were and they knew who traveled with them. They were pretty quick to discredit writings of "recent appearance", "questionable authorship" or that were not "God Breathed".