There are already overly restrictive background checks in place. As far as I know, both shooters bought their guns legally and probably passed said checks.
But how why was Connor Betts allowed to purchase a gun when, on another thread, it is stated that he had a hit list and a rape list when he was in high school? He was suspended from school for a time while being investigated. Why would that not have been part of public record?