For no prophecy was ever produced by the will of man, but men spoke from God as they were carried along by the Holy Spirit.
2 Timothy 3:16 (ESV)
All Scripture is breathed out by God and profitable for teaching, for reproof, for correction, and for training in righteousness,
1 Corinthians 2:13 (ESV)
And we impart this in words not taught by human wisdom but taught by the Spirit, interpreting spiritual truths to those who are spiritual.
God inspired the writers , so their message is authentic and reliable. God used the talents, education, experience of each writer . In some cases He actually dictated His words to them. Many of the prophets would say,
“ The word of the Lord came to me…”