Job is the earliest (in terms of the time it took place) in the bible (other than the creation accounts in Genesis, that although they occurred earlier, they were not written down until AFTER the time of Job).
Job came well before Moses, and before Abraham.
I have no doubt Job is not an allegory or parable, it’s a true account. Keep in mind, it came before the law was given.
Also, most people have trouble with the fact that Job’s children were killed and more restored to him. Just a reminder - God’s timing is perfect, what the enemy means to cause harm, God turns into good. God’s allowing Satan to destroy Job’s children may very well have insured their salvation...who knows what the success of Job’s household may have done to those children? Only God knows what is best.
We see through a glass darkly, we should trust God’s eyes.