I use each of my masks for probably at least 10 hours before throwing it away, and I've never gotten covid except once (in Jan or Feb 2020) before I started wearing masks (in fact, before anyone in my country -- the US -- knew about covid).
(I have to write "probably" because I don't actually keep written records of how long I have each mask on. I rarely have one on for more than an hour at a time.)
I've used mainly 3M 8511 masks.
The most important distinction between mask models is that some models have valves / vents and some do not.
Hospitals use ones without valves. The lack of a valve means that the part of the mask that filters the air gets a lot more damp than it would if a value were present (because exhaled air is damp) which might drastically reduce how long the mask will last, so that might be why some hospitals instruct their employees to use a new mask for each new patient contact.