An international team led by Yosuke Yamada of Japan's National Institute of Biomedical Innovation, Health and Nutrition measured water turnover directly in 5,604 people across 23 countries, from eight-day-old infants to 96-year-olds, using a tracer-based method rather than a guess.
Participants drank a small amount of water labeled with a safe isotope, and researchers tracked how quickly it left the body to calculate turnover. The result varied enormously, with average turnover from about 1 to 6 liters a day and a few people above 10 liters, driven by body size and activity.
Needs tracked more closely with energy expenditure, environment, and life stage, pregnancy and breastfeeding both raised turnover, than with any single number that applies broadly. The eight-glass figure traces back to a vague mid-twentieth-century recommendation that was never tested in a trial and that even its original source did not clearly intend as a literal daily drinking target.

Read the original study
Yamada et al., Science, 2022 · doi.org/10.1126/science.abm8668
There was no study behind eight glasses.
Source
- Yamada, Y., Zhang, X., Henderson, M. E. T., Sagayama, H., Pontzer, H., Watanabe, D., Yoshida, T., Kimura, M., Ainslie, P. N., Andersen, L. F., Anderson, L. J., Arab, L., Baddou, I., Bedu-Addo, K., Blaak, E. E., Blanc, S., Bonomi, A. G., Bouten, C. V. C., Bovet, P., . . . International Atomic Energy Agency (IAEA) Doubly Labeled Water (DLW) Database Consortium§ (2022). Variation in human water turnover associated with environmental and lifestyle factors. Science, 378(6622), 909–915. https://doi.org/10.1126/science.abm8668