If the Bible is written by sinful people, how can we trust it?
We can trust the Bible because it is God’s Word. It is his message to us. Think of the power of God not only to change our lives but to use us. He can even use a sinner. But I disagree with your premise. The people who wrote Scripture were not sinners.
The books of the Bible were written by people who had an ongoing relationship with God. They were prophets and apostles. They were not sinners. Each of them had a deeper relationship with God than many Christians today.
We can trust God’s Word because the people who wrote it were so close to him that they spoke with him face-to-face. He spoke through them as they wrote down his words. The prophetic books are literally God’s words to Israel through his chosen mouthpieces.
Prophets like Isaiah had a powerful experience where God cleansed their mouths and lips so he could speak through them (Isaiah 6). Moses wrote the first five books of the Bible and he spoke with God face-to-face. The apostles walked with Jesus and, therefore, had authority to write his words, about his ministry and life.
These were people who used to be sinners. But God changed them and made them instruments of his message. And he can use anybody today. He can change the sinner into a saint. But the canon of Scripture is closed. No more books will be written for the Bible.