Mass is a measure of how much matter an object contains and of its inertia—how strongly it resists changes in motion. In the SI system it is measured in kilograms, and it stays the same whether you are on Earth, the Moon, or elsewhere.
Weight is the gravitational force acting on that mass. It depends on both the object’s mass and the local gravitational field, so it is measured in newtons and changes with location (for example, an object weighs about one-sixth as much on the Moon as on Earth while its mass is unchanged).
Everyday language often treats the two as the same, but a balance compares masses and gives a location-independent result, whereas a spring scale measures weight and can read differently under different gravity.
Source: What Is the Difference Between Mass and Weight? — Encyclopaedia Britannica.