The current theory on the formation of the moon is that during the early solar system, a body around the size of Mars impacted the forming Earth and the ejecta formed the moon. Unfortunately, recent modeling shows that in this case, lunar material would mostly come from the impactor. Since the lunar material is very similar to Earth, this means the impactor would have to have had the same composition as Earth. Rather unlikely.
Other hypotheses have been put forward.
First, a smaller impactor hitting a fast spinning Earth. This makes a moon of the right size, with most material from Earth.
Second, the proto-Earth and the impactor are about the same size. This will give a full size Earth and Moon with a composition that is a mix of the 2 bodies.
The main problem with them seems to be that there is way too much angular momentum after the impact. The hypotheses have ways to shed this extra momentum, but it seems to be stretching it. They require more things to happen. It’s getting more complicated (and contrived) than the nice, simple (and likely wrong) single impact theory.