Origin of scripture
The scriptures—specifically, the Vedas—themselves explain that although they appear within human society for our benefit, they weren't written by ordinary humans, but by beings empowered by God with the necessary vision. They're like the instruction manual for how to live in this world; and most instruction manuals aren't written by the inventors themselves.
In Sanskrit the scriptures are called apaurusheya, not of human origin. Ultimately, all scriptures are given to us by the Supreme Person, who delegates responsibility to others for disseminating them.
You can test the validity of scriptural statements by acting according to them and seeing if the predicted benefit is attained. Blind doubt is just as bad as blind faith. You have to test the statement, as far as is possible, in order to have faith.