How do astronomers primarily determine the mass of a distant galaxy?

Answer

By observing motion and light.

Astronomers infer galaxy mass by observing how its constituent parts respond to the gravitational pull exerted by the total mass within a specific region, relying on motion and light.

How do astronomers primarily determine the mass of a distant galaxy?
physicsmeasurementgalaxyastronomymass