Hello,
Here is your answer:
The proper answer to this question is "from its gravitational effects on other bodies in the solar system".
Here is how:
For example: If the planet has a moon scientist use a thing called which "can be relatively straightforward" which also determines the mass and height.
Your answer is from its gravitational effects on other bodies in the solar system!
If you need anymore help feel free to ask me!
Hope this helps!