The 10 Commandments of the Old Testament were allegedly written on stone tablets by God at around 1490 BCE. However, God may have consulted the Egyptian Book of the Dead. The Book of the Dead is an ancient Egyptian funerary text used from around 1550 BCE. In chapter 125, we have all of the 10 Commandments.
For example, the Book of the Dead says “I have not blasphemed” and the Exodus says “Thou shalt not take the name of the Lord thy God in vain: For the Lord will not hold him guiltless that shall take the name of the Lord his God in vain.” The Book of the dead says “I have not stolen” and the Exodus says “Thou shalt not steal.”
This correlation could be because the 10 Commandments simply outline the basic things one must not do to remain a decent human being, and in most cultures, the those basic things are the same; most places do not smile upon murder, disrespect, etc.