In a good holster many modern handguns are highly resistant to going off. They resist impact unless bubba does his super trigger job, have firing pin disconnects or transfer bars etc In a good holster that securely holds them they are generally safe.
The danger is when you take them out of that holster.
Like when complying with a law that requires you leave it in the car to go inside certain locations or places prohibiting carrying, or even worse unload it in places that require it be unloaded to put it in the vehicle.
Then you are unloading and loading guns, holstering loaded guns, often in your vehicle in semi public trying to be discreet and unseen.
Racking a slide to chamber a round always has a slight risk. Putting a chambered gun back in a holster with straps and snaps or a finger that might get wedged between the holster and the trigger is how many are discharged unintentionally. A manual safety can help reduce that risk.
I always like to use two hands to holster a Glock for example, I hold the retention strap out of the way with the other hand. Unneeded most of the time, but sometimes that retention strap will work its way in the trigger guard if you holster enough, and if it gives enough resistance the gun will fire.
So the biggest danger is not carrying loaded, it is being forced to load and unload it to comply with the law throughout the day.
Without that requirement a loaded gun sitting in a holster is pretty safe if you keep control of it. But with so many states prohibiting carry in certain places or allowing businesses which are open to the public to prohibit carrying, the danger is definitely increased.