God didn’t order Abraham to sacrifice his son!
Abraham/Ibrahim Nabi perceived his dream as an instruction and tried to realize it.
“(Abraham) said: My child! I see myself sacrificing you in a dream. Look, what do you think?…” (The Quran, as-Saffat  102).
The order to sacrifice the son is in the Old Testament:
“… Offer your son as a burnt offering (sacrifice).” (Old Testament, Genesis, 22:2).
The Babylonians sacrificed children to the god Moloch.
Ibrahim Nabi’s “Look, what do you think?” expression shows that this is his own opinion, because it is unthinkable for him to consult someone about whether or not he should carry out an order that Allah has commanded him. Again, if this were a divine order, it would have been fulfilled.
Consequently, the command to sacrifice the son is not in the Quran, but in the Old Testament.