Deriving the Galactic Mass from the Rotation Curve
https://www.astronomynotes.com/ismnotes/s7.htm#A2.4
You could also sink the Galaxy in a vat of water and check it’s displacement.