This a question about the Inerrancy of the bible.

Did God prepare David to face enemies like Goliath to kill them? How did God intend Israel to possess the promised land?  I get that they were not seeing God accurately so they behaved as they understood God to be, but if they had understood the true nature of God how would these stories have played out ?  Was it even Gods intention to give someone elses possessions to Israel, or is that too a product of Israel misunderstanding Gods plan for them.

I’m sure the bible is true but what is it true about?