There are four theories of moon
formation; first is Fission theory which says that when the earth
was forming it split into earth & moon. Second is Sister theory which states that both earth and moon formed same time separately.
Third is Capture theory which says that moon is captured by earth’s gravity from space
and last theory or hypothesis is the Impact with Earth
which says moon formed by the collision of a big object with earth due to which material
from earth ejected.
Most acceptable is Impact idea as both earth and moon are made up of almost same material although there are not many heavy metals on the moon but that could easily be understood because that impact must be with the earth’s crust which is not rich in heavy elements.