There are two general ways to reduce the transmission of the virus. One is “engineering”, changing the physical environment, the other is “social”, changing behavior to keep people distant from each other. Under engineering, we can include not only physical partitions, UV lighting and ventilation, but also mask-wearing and other PPE. I know, there is a very large behavioral component to masking, but I want to focus on the distancing aspect, so let’s put everything else in the engineering box.
Now for distancing. Suppose we know instantaneously and with certainty everyone who is infected. In that case, we can selectively quarantine them, and this will cut off transmission. That is possible only in rare circumstances, such as a country that has fully eradicated the virus but has occasional external visitors. If you have a reliable test you can identify anyone arriving with the disease and isolate them. The rest of the population, known to be uninfected and unexposed, can move freely and congregate as they want.
A more realistic case is that you know with near certainty everyone who is infected, but only with a delay. Then those who came into contact with them during their potential spreading period are also suspect and need to be isolated. This is the idea behind contact tracing, which imposes distancing on a small subset of the population who may not be infected but leaves everyone else free to go on with their life.