system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How did they determine the weight of the Earth, and other bodies in the Cosmos without a scale?
gpt
The weight of the earth was determined by first measuring the force of gravity between two 1-kilogram weights (Henry Cavendish performed this experiment in the 18th century).  From there, you can measure the force of gravity on any object to determine the mass of the Earth, and if you know that, you can calculate the mass of the Sun from it's gravity, which lets you calculate the mass of the other planets.  

For other stars, it's just estimation.  If they're close enough to another star, you can use the observed gravity to calculate one or several possible answers for their masses.  You can get an idea of what a star is made of and how dense it is by the light it emits, so with enough examples it's possible to get pretty good estimates just based on the size and color of the star.