Guns need to be tracked with an embedded GPS tracking device. If your gun doesn't carry the tracking device, you lose it. Develop/advance technology in public gun detection devices. Go through a Walmart entrance that can be locked down If certain weapons are detected. Install gun detectioon devices in the streets to indicate gun carriers.
You will never be able to keep track of every looney tune that wants to kill people, but we can damn sure do a better job keeping track of guns in the US IMO.