Let's start by explaining that mass and weight are very different concepts.
Mass [tex]m[/tex] is the amount of matter that exists in a body, which only depends on the quantity and type of particles within it. This means mass is an intrinsic property of each body and remains the same regardless of where the body is located.
On the other hand, weight [tex]W[/tex] is a measure of the gravitational force acting on an object and is directly proportional to the product of the mass [tex]m[/tex] of the body by the acceleration of gravity [tex]g[/tex]:
[tex]W=m.g[/tex]
Then, since the Earth and the Moon have different values of gravity, the weight of an object in each place will vary, but its mass will not.