I suspect God, or His Angels, told the writers about dinosaurs. Or, since God made man in His own image, man was intelligent enough to figure it out.
Yes people tend to forget that writers of the Bible were in direct communication with the Creator.
Also many persons mock believers in the Bible thinking the Earth must be only 6000 years old because of some misinterpretations of Genesis. Genesis never says how long Adam and Eve lived as spiritual immortals in the Garden of Eden. For all that anyone knows, they may have been there for billions of Earth years before following the deception of Satan.
It is amazing that nothing literal in the Bible can be taken to refute its truthfulness. It would have been entirely possible for deceptive writers of biblical books to state unequivocally that the Earth was 6000 years old but nothing was so stated. Genesis only refers to how many years Adam lived after he was cast out of the Garden.
So many things could have been said in the Bible that would be easy to prove were untrue. Plenty of things were said that are incredible to believe such as parting the Red Sea or Jesus rising from the dead. These are incredible things but they can’t be proven true or untrue. To accept they are true takes faith not proof. To think they are untrue requires the same.
Nonbelievers think that because they have never witnessed seas parting or dead people rising to life, that this is enough to refute any such reference in the Bible. They use their life experience as proof that no such things can occur. That is not proof they are claiming, that is merely a testimony that they have never been chosen by God to see these incredible things.