The Canon of Holy Scripture is the divinely authorized collection of writings—no more and no less—than are indeed God’s Word revealed to humankind for God’s gracious purposes, through the supernatural agency of the Holy Spirit.
Now. How did Canon come to be?

III. The Canon Decided

Was there one big meeting in history when the Canon of Scripture was set?11 No. While there were essential councils of both the Hebrews and the early church fathers, no single gathering of representatives of the Church issued the final Word on the Word of God.
”After the Maccabean persecution, the history of the formation of the Canon is merged in the history of its contents. The Old Testament appears from that time as a whole. The complete Canon of the New Testament, as commonly received at present, was ratified at the Third Council of Carthage (A.D. 397), and from that time was accepted throughout the Latin Church” (”The Canon of Scripture,” Smith’s Bible Dictionary). 
The reason is apparent. The Church did not create the Holy Bible. The Church, in both the Old and New Covenants, was revealed by the Bible.
The matter of ”who decides what is in and what is out” leads the student of Canon to a perennial debate within the Church. The division of thought could be characterized as the ”Community or the Received” debate\cite{peckham2016canonical}.

Is the Canon of Scripture a Product of the Community?

In this view, held by many Roman Catholic believers and some in Protestant denominations, the Canon of Scripture is set, not by one gathering of church leaders on a specific date, but, instead, is authorized by its usefulness and acceptance in the churches. Here is a description of the view by a Roman Catholic source, set forth, in my opinion, in the most gracious way, allowing room for both sides of the argument:
The Early Church Fathers understood the Canon of Scripture was set by God. They also knew that God communicated this fact through the Catholic Church. Many of them lived during the period when this was done. There was no consensus, as some seem to think. Eusebius tells us that the book of 1 Clement was read in the churches from the early days until his own time (Church History 3:16 [A.D. 325]) (Farma, The Early Church Fathers on Church Canon) \cite{kruger2012canon}.
This via media view has much to commend. However, this explanation stops short of affirming the miracle of the Canon of Scripture.

Is the Canon both created and received through the work of the Holy Spirit?

Yes. The Canon of both the Old and New Testament developed through time, in localities, by mortal writers, yet all by the supernatural work of the Holy Spirit. The Bible was and is received as the Word of God because  it is the Word of God. This is the message of those (I am among them) who confess Scripture because we believe that the Holy Spirit in a believer (or the Spirit working upon the heart of an unbeliever) recognizes Himself in His Word. There is a supernatural connection that is not a nebulous ”burden in the bosom” of Latter-Day Saints, but, relatively, a Spiritual power from on high that converts, convinces, condemns, corrects, and, in all ways, glorifies Jesus Christ as the Word of God. No Reformed confessional document espouses the miracle of the sixty-six books of the Holy Bible any better than the Westminster Confession of Faith (1646) \cite{carruthers1897shorter}
The following is from the Westminster Confession of Faith (1646) , 1:IV:
IV. The authority of the Holy Scripture, for which it ought to be believed and obeyed, dependeth not upon the testimony of any man or Church, but wholly upon God, (who is truth itself,) the author thereof: and therefore, it is to be received, because it is the Word of God. 
Some have argued that this is circuitous reasoning and, therefore, a logical fallacy. Others have called it biblicism. The charges would be credible but for one immovable and incontestable reason:The Person of Jesus Christ. If Christ Jesus is the resurrected, ascended, and reigning Lord of Lords and King of Kings, then the origin, Canon, and purposes of Holy Scripture are altogether divine: ”And beginning with Moses and all the Prophets, he interpreted to them in all the Scriptures the things concerning himself” (Luke 24:27 ESV).
The believing community did not select the books of the Bible for their purposes. God brought forth the books of the Bible for His intentions (I owe the concept of ”intentions” concerning the definition of Canon to Dr. Michael Kruger in his Michael J. Kruger, “The Definition of the Term ‘Canon,’“ p, [Kruger, 2012]).

IV. The Canon Defended

The canonicity of the Bible does not need me or any other to defend its divine nature. The heavenly essence of Holy Scripture is its citadel.