I hope this helps?
Your comment highlights one of the reasons the Holy Spirit inspired the Scriptures—so that we can have confidence in what has been written. If the Scripture were not inspired and inerrant we would be constantly wondering if we could really rely on and trust what has been recorded.
For example, if a pastor preached a sermon on a certain passage, we could greet him at the door afterwards with, ‘But what if the passage you preached on is in error?’
We can’t do that now because we have been told that the Holy Spirit inspired all Scripture. None of it was written at the whim of man; it’s all from God.
For that reason we know Paul was in the right. It is recorded that way, and the Holy Spirit allowed it. Thus His imprimatur is upon it, and like all the rest of the Scripture it is useful for our spiritual development.
2 Timothy 3:
16 All Scripture is inspired by God and profitable for teaching, for reproof, for correction, for training in righteousness; so that the man of God may be adequate,
equipped for every good work.