I was serving in the last couple years of my military career when the pandemic started. The military took it very seriously, because we still have a mission that needs to be accomplished. Anyone dropping out for a severe illness would compromise our capabilities.
So we went on full lockdown. No one was allowed to leave military bases unless you lived off-base, in which you were only authorized to go straight home and then back to work. It was highly recommended you order delivery services for groceries and stock up so you wouldn't need to leave home. Going to the grocery store was the only exception to the lockdown, but it was considered an extreme risk and should be avoided if possible.
Our work shifts (in my unit, anyway) were split in half. Half the crew came in for the morning shift, then thoroughly disinfected the office, locked up, and went home. Then 30 minutes later, the second shift would come in and do the afternoon shift. The 30-minute break ensured no physical contact between shifts. The split-shift allowed a shift to take over full work days in case someone on the other shift got sick. Their whole shift would stay home for 2 weeks to ensure the contagious period passed before sending them back into the office to resume split shifts.
We would've moved to work-from-home (WFH), but unfortunately, I happened to be working in an Intelligence unit at the time and 90% of their job was on classified computer systems, which we couldn't access from outside the office. I was an IT guy, fixing the Intel guys' computers, so I did WFH for a few months, managing their unclassified computer accounts from a laptop. But eventually, I was needed in the office for their other systems.
We were also required to wear masks outside of our homes at all times. Anyone caught without a mask anywhere - even sitting in our car on the drive to or from work - could be punished for violating a direct order from our base commander. We used to make fun of conservatives who bitched about how uncomfortable the masks were and how they couldn't breathe while wearing them. We had to wear them all day without breaks, from the moment we left home until the moment we got home. I empathize with emergency room workers; it was brutal, but it wasn't impossible to do, and we got used to it eventually. After a while, I started to feel naked without my mask on.
In the last 2 years I served, we had a few people drop out with COVID-19 (their civilian families brought it home from their work/school), but the majority of us stayed COVID-free.
When I retired last summer, I moved in with my elderly hermit dad who lives out in the countryside. He avoided leaving his house for the whole pandemic, and even now rarely goes into town. He, my wife, and I are still COVID-free to this day.
My sister and her family caught it 3 times! But my sister married into an ultra-conservative religious family who thought the pandemic was a hoax and continued to hold religious parties and barbeques for the neighborhood all throughout the pandemic (They were anti-vaxxers too; something my sister fought with her husband about long before the pandemic occurred). There were a few scares when she came to care for our father and then got diagnosed with COVID-19 a day or two later. But somehow, my dad never tested positive for COVID antibodies. And despite my sister's husband losing his sense of taste and smell (which is still not fully recovered to this day), her whole family has thankfully survived their run-in with COVID.