Because 1 Peter 3:15 tells us to "always be prepared" to answer questions about our faith, let's consider how to best answer this
"How can you trust the Bible when it was written by men?"
It's true the Bible was written by over 40 writers from different backgrounds and time periods, in three different languages.
They wrote prose, poetry, prayer, historical narrative, doctrine, prophecy, etc. and covered complex and controversial subjects.
Yet--incredibly--their words have unity and agreement. This shows me they weren't writing their opinions but writing what God inspired them to write.
The Bible confirms that men empowered by the Spirit wrote Scripture (2 Peter 1:20-21).
2 Timothy 3:16 calls all Scripture "God-breathed," a term meaning completely inspired by God. And Peter calls Paul's letters "Scripture" (2 Peter 3:16).
These things plus the way God has preserved the Bible for thousands of years give me complete confidence that it's not merely the words of men.
How would you answer this question?
For a good resource with more information on this question read: God is the Sole Author