How are the masses of solitary stars weighed? With binary stars you can measure the pull each applies to the other, but that isn't an option with solitary stars.
There are a number of ways, none of them is as precise as measuring binary motion.
The mass-luminosity relationship, calibrated using stars in binary systems with measured masses, works quite well for main sequence stars.
The broadening of some spectral lines is highly dependent on surface gravity, thanks to pressure broadening. Using a model atmosphere you can estimate the surface gravity from high resolution spectroscopy and this depends on $M/R^2$. Then, if you can also estimate the radius (e.g. using the measured luminosity and a temperature also obtained from a spectrum), the mass can be estimated.
A related method is to estimate the gravitational redshift, which depends on $M/R$. This can be done for white dwarfs if the intrinsic line of sight velocity is known, but gravitational redshift is too small for this to be used in "normal" stars.
My final offering is through asteroseismology - the measurement of characteristic pulsation frequencies. The spacing between the frequencies has a complicated dependence on $M/R$, which again can lead to a mass if the radius is also estimated from the luminosity and temperature.
More details and some references at https://physics.stackexchange.com/questions/141875/how-do-you-estimate-the-mass-of-a-star
For stars on the main sequence, there is a mass-luminosity relationship
Sourced from (Astronomy by Openstax and Department of Physics and Astronomy at Douglas College, Chapter 18.2 Measuring Stellar Masses cc-by
From this an estimate of the mass can be made. If one can also estimate the age of the star, the estimate can be improved. For stars that are off the main sequence, estimating the mass may be much harder, and depend on a model of stellar evolution. Moreover, as luminosity estimates depend on distance, uncertainty in the distance of stars can be a significant source of uncertainty in their mass.
For a star like Betelgeuse, estimates of the mass range from 9 to 21 solar masses (with older models suggesting as much as 30 or as little as 5 solar masses) (see Wikipedia). It can be said that for such stars, it is not possible to determine the mass, only to make a broad estimate of a range of possible masses.