While Luna 3 is famous for being the first spacecraft to capture images of the far side of the Moon, it also carried a magnetometer, which is an instrument that measures magnetic fields. The data collected by Luna 3's magnetometer indicated that the Moon has a very weak magnetic field, far weaker than Earth's.
This finding was further confirmed by subsequent missions, including the Apollo missions, which also carried magnetometers.