As we talked about a couple of days ago in 2 Timothy 3:16-17, all scripture comes from God. It may be written by men, but the words are inspired by God Himself. In 2 Peter 1:21 Peter says, 21 For prophesy never had its origin in the will of man, but men spoke from God as they were carried along by the Holy Spirit. Men who were carried by the will of God through the Holy Spirit living in them drove the actions of the men in scripture. And it is these inspired men who helped produce the words of God shared in scripture.