This is typically done by epidemiological modelling (often compartment models) and I wouldn't say there is any one "gold standard" approach but rather a collection of approaches: simpler models have the benefit of having fewer free parameters to fit but the simplifying assumptions may lead to systematic errors, more complex models have the benefit of modeling real-world mechanisms and complexity but also may require more a priori choices in model parameters.
What most of these models have in common is fitting some sort of differential equation (or set of equation) to disease spread. The basic reproduction number that comes out of these models represents the average number of individuals that each infected individual will spread the infection to (assuming those individuals are susceptible to infection, for example that they do not have a prior exposure or vaccination granting them some level of immune protection). However, the interpretation of this number varies by model and estimation method, so it shouldn't be taken as some fundamental property if you're comparing different types of models.
Wikipedia has a brief introduction to some of the modeling methods used, but it's important to realize that people write entire textbooks about this sort of thing. Modeling disease transmission is a big chunk of the entire field of epidemiology, and no one will come around with a simple solution that makes the rest of it irrelevant.