Outdoors is safest: aerosols disperse into a near‑infinite volume.
Indoors, viral quanta build up as people exhale into limited airspace.
Risk rises with emission rate, poor mixing, low ventilation and time.
Dilution lowers dose — and dose drives infection.
See this info:
https://www.gov.uk/guidance/ventilation-to-reduce-the-spread-of-respiratory-infections-including-covid-19