mass of an object is the gravity it exudes and is compelled to.
in empty space is you had a ball of lead, of Styrofoam and a potatoes all the same size the potatoe and lead would pull on each other causing them to move on each other faster than the Styrofoam. eventually the Styrofoam would get to where they meet but it would have to move further as the lead and potatoes would not be as attracted to the foam as each other or themselves.
this is generally referred to as density. you can compress something and its weight per volume would increase but it’s total mass would not change. a bag of feathers that weighs 10 pounds on earth has the same mass as a small 10lb lead weight the reason basically is the have the same number of atomic particles(electrons, neutrons and protons) which varies by the element, the simpler the atom the less particles, the less mass.
Latest Answers