Jesus did have knowledge limitations because He had part human nature. He did know what was true because he only taugh what the Father told him to teach - John 8:28
Jesus also affirmed the truth of his teaching would never pass away - Matthew 24:35
If Jesus is God, then whatever he teaches is ture. If he teaches the Old Testament is the word of God, then it is true.
Also consider that the Old Testament does not paint rosey picture of the Hebrew people. If an invented story, the Israelites would be recorded as noble and upright people.
Instead they sinful, recused by God and abandoned God ever chance they got.
There leaders included:
As God, if th New Testament documents are reliable, then the Old Testament Old Testment is without error because Jesus said it is.