The weight of an object is the measure of the force of gravity on that object. The calculation of the weight of an object takes into account both the object's mass and gravitational force.
The weight of an object is the object's mass multiplied by gravity's acceleration force. While the mass of an object is a fundamental property of the object, gravitational acceleration can be variable which means every object's weight is variable. For instance, the mass of an object on Earth is the exact same as the mass of the object on the moon. Mass does not change when the object is placed in different settings. However, because the force of gravity is different on Earth than it is on the moon, an object will have a different weight on Earth than it will have on the moon.
Gravitational force depends on the mass of large objects in space. Earth has a gravitational pull, meaning all objects on the surface of the Earth fall towards the center of the planet's mass. The moon is much smaller than Earth, so gravity has a smaller force on the moon than it does on Earth. Therefore, the weight of an object is actually just a measurement of the object's mass in relation to other massive objects.