since this is a good faith questions i'll give a thorough answer.
first of all the most important thing is keeping it in perspective. any incident that leaves innocent people dead is a tragedy, and it's especially sad when children are involved, but emotional knee jerk reactions aren't helpful. as of parkland the odds of dying in a school shooting were 1 in 614 million. kids are more likely to die not only in an accident on the way to school, but also in an accident or from an illness contracted in interscholastic sports. while these events are horrific they're extremely rare.
it's disgusting to me that everybody attempting to politicize tragedies like this don't think of the children even a tiny bit, often while accusing the others of not caring about the children. kids dying in a school shooting is a horrible tragedy, but what's much worse is adults terrifying kids over an event they'll almost certainly never have to deal with. children are very impressionable and take things to heart very easily, making them believe school is a dangerous place is absolutely abhorrent.
second, we need to realize that just like every other horrific act people commit there is no way to completely stop it, and that "doing something" is not inherently superior to doing nothing. it's very common to hear the emotionally manipulative "kids are dying and you don't care because you're doing nothing," but that's an incredibly childish way to look at things. every action has a reaction, action that isn't helpful isn't better than no action at all. when somebody says the inaction needs to stop and we need to do something ask them what. then ask them how it'd help. you'll almost certainly find they don't know, they just think something needs to be done. these people act as if they have moral superiority, but they're really just emotional children.
third, we need to stop giving the shooters attention. somebody else made a post on this earlier so i'm not gonna go deep into it, but a lot of mass shooters do it because they want to make a name for themselves. focusing on the victims rather than the shooter in media coverage could help that.
fourth, we need to identify the problem. people keep citing the "27 school shootings already this year" but i've yet to see a single person discuss what caused most of them. if you go through the list of shootings most line up with overall gun crime statistics, fights in high crime areas. the school shooting that everybody thinks of where a crazy kid kills a bunch of people at random are incredibly rare (even in the context of already incredibly rare events), most shootings that happen at school share the root cause with the majority of violent crime. focusing on the anomalies that are incredibly difficult to stop is ignoring most of the problem.
as far as actual actions, i think it's contextual. mental health needs to be addressed, lack of social cohesion needs to be addressed, the consistent failure of law enforcement to deal with known threats needs to be addressed. inner city schools often already have metal detectors, but a large portion of school shootings don't happen inside the school. inner city schools also usually have police presence or armed guards, both of which can help. arming teachers is scoffed at but it's actually very effective, but the teachers need to be willing to go through the training.
overall the "kids are dying we need more gun control" is possibly the stupidest take one could have on the topic. most of the areas with the most gun violence already have strict gun laws. the vast majority of gun violence is committed with illegal guns, and when it is committed with a legal gun it's pretty silly to think somebody that is willing to shoot children wouldn't be willing to get an illegal gun if denied legal access. multiple mass shooters have stated they chose their target based on strict gun laws and gun free zones because they knew they'd have a higher likelihood of success.
in the end we need to stop politicizing these tragedies and look for actual proven solutions. whining about "doing something" and advocating completely infeasible things like gun bans doesn't help anyone, especially not children.