God dictated the 10 commandments to Moses, not Genesis !
Wrong!
He dictated all of Torah to Moses.
That is why he was up there for months on the mountain.