Non-pharmaceutical interventions such as masks, social distancing, ventilation, working from home, testing to identify carriers, isolating contacts of detected cases etc protect everybody by reducing the prevalence of the virus in the community.
Transport workers are safer if people on public transport wear masks.
Supermarket workers are safer if people get a delivery rather than go to the shop. Or wear a mask in the shop.
Everyone is safer if people work from home if they can, reducing their contacts from potentially hundreds/thousands a day to single figures.
Everyone is safer if contacts isolate.
Everyone is safer if vast numbers of essential workers don't^^ all get covid and collapse essential services due to lack of staff.
A lot of it boils down to how many contacts people have every day.
It doesn't matter if people have them at work, school, the gym, church, nightclubs, or weddings
The fewer contacts everybody has, the better.
The more contacts everybody has, the more cases rise and the more problems will be caused.