My personal view is the first book of the law to be written was Deuteronomy, during the reign of King Josiah. The "history of the Jews" was later expanded after that, to Samuel, then to Judges and later to the Occupation narratives, and then to the Exodus.
I also have the view what Mark was written first, and Matthew was expanded from Mark, with the help of a LXX scroll.
In like manner, the Quran was written hundreds of years after the putative Mohamet, which in part is why there are fewer variants of the Quran than other religious texts. During the time of "Mohamet" there was no written form of Arabic. The Syrio-Aramaic characters were used, and Christian religious writings were extensively plagerized during the composition of the Quran.
But the gospels translated by Joseph Smith Jr.: they were miraculously preserved and translated. No doubt there at all. (sarcasam lite on)
Your mileage may vary.
This is contrary to immemorial Jewish Tradition, which holds that the Torah preexisted the world and was dictated to Moses letter-for-letter, who wrote it down.