This is the kind of thing that happens with disturbing regularity in the United States and it’s not preventable. There is no way to undo the massive increase in gun ownership that resulted from the Bush-era lapse of the Assault Weapons Ban. You can’t put the toothpaste back in the tube.
There is no magic bullet. There is only an excessive response by the public to such crimes because it’s not enough that the shooter pays, those around them must pay as well.
We need a red flag law that allows a family or family members to report psychologically unstable family members whom they suspect of being willing and able to carry out a mass shooting. Then those people are remanded for one month of psychiatric evaluation after which, if cleared, they are not permitted to own a firearm for five years.
If a family fails to alert the authorities and a mass shooting event occurs, the entire immediate family will be charged along with the defendant of murder… and executed publicly upon conviction. We can’t contain this without the family stepping up and they never will until something forces them to do it.