it is a reasonably safe rule of thumb that an armed guard has less stake in protecting you than you do, on average. most people also lack access to readily available armed guards in the timeframe a shooter can kill someone.
i don't know how to square that at a school though. arming students to the teeth would deter random school shooters (if every school did it, we'd never get another uvalde), but i suspect giving children guns would lead to more deaths overall and more permanently traumatized people as a result. the mental picture of a group of elementary schoolers immediately dropping a shooter without mercy is amusing as long as it isn't real though. pick quantity ideas in eu 4!
shooters that are looking to stack body counts by attacking random people pick places like this/churches/theaters because they have a lot of people in one place that are unlikely to be capable of defending themselves (for one reason or another). rather than heavy handed gun laws (which do not appear to be useful), we should probably use policy that makes rando-targeting mass shooters less likely to want to do it. i don't know what that looks like, but this style of shooting is way more common now than 40-80 years ago, despite that weapons that could inflict this kind of damage have been readily available the whole time.