Michael J. Kruger (original source here: https://www.michaeljkruger.com/did-the-church-create-the-bible/ ):
The perennial question in the debate over sola Scriptura is whether the church is over the Bible or the Bible is over the church.
The latter position is (generally speaking) a Protestant one—the Scriptures, and the Scriptures alone, are the only infallible rule and therefore the supreme authority over the church.
The former position (generally speaking) is a Roman Catholic one—the church decided the canon and also, through the pope, decides how these books are to be interpreted. In this way, the authority of the Bible rests on the (prior and more foundational) authority of the church.
Of course, Catholics would not word it quite this way. The Roman church insists that the Scripture is always superior to the Magisterium. Dei Verbum declares, “This teaching office is not above the Word of God, but serves it” (2.10). However, despite these qualifications, one still wonders how Scripture can be deemed the ultimate authority if the Magisterium is able to define, determine, and interpret the Scripture in the first place.
Regardless, this question of whether the church is over the Bible also comes up in the world of critical scholarship. Critical scholars will often make the point that, historically speaking, the church essentially created the canon sometime in the fourth or fifth century. The canon is merely a human product.
So, there is unexpected common ground here between the Roman Catholic view and the historical-critical view. While the former believes these books are divinely inspired, and while the latter believes they are not, they both agree that the church is the cause of the Bible.
Now, it should be acknowledged that there is a sense in which this is true. The Bible was written by divinely-inspired individuals who were part of God’s covenant community (i.e., the “church”). And later Christians (also part of the “church”) recognized these books as from God.
But, we have to be careful not to confuse the proximate “cause” of Scripture (human beings) with the ultimate “cause” (God himself). From a divine perspective, the church could not in any way be regarded as the cause of God’s divinely-inspired speech. On the contrary, God’s divinely-inspired speech always stands over the church and governs her.
For more discussion of this important topic, and a very (!) brief defense of the Protestant position, here is a video Michael Kruger filmed with Don Carson
Why you can rely on the canon?