Between 1969 and 1972, Apollo mission astronauts explored the lunar surface, collecting geologic materials and returning them to Earth for careful study. After consideration of many lines of evidence, one of the many major results of studying the Apollo rocks is the broad scientific consensus that the Moon formed from the debris of a giant impact of a large body with the proto-Earth (e.g., Stevenson 1987). This left the Moon depleted in highly volatile elements such as hydrogen, relative to Earth. So it was thought.
Maryjo Brounce, Jeremy W. Boyce, Jessica Barnes, and Francis M. McCubbin, SULFUR IN THE APOLLO LUNAR BASALTS AND IMPLICATIONS FOR FUTURE SAMPLE-RETURN MISSIONS, Elements, Oct 2020, 361, DOI: 10.2138/gselements.16.5.361