Scientists have been thinking about this question for a long time.
They began by keeping track of the Moon’s motions, then taking photographs of the Moon’s surface, sending astronauts to study it, and analyzing its rocks.
There is not enough evidence, however, to prove any single one hypothesis that explains the Moon’s origin. In astronomy, just as in any branch of science, scientists revise and update their explanations for things as new data is collected.
Sometimes they collect enough information to say for sure that one hypothesis is not true—or less likely than the others.