You start by understanding the multitude of dynamics at play that create an outcome, and you look at what can be influenced to change the underlying conditions that lead to a situation.
For example mandating car insurance, driving licenses and annual inspections leads to safer cars, better drivers and the ability for accidents to be handled more simply. It doesn’t stop idiots from driving badly or drunks from killing people entirely, but it does reduce these things over time. As a drunk or crazy driver will have their license revoked and may even be imprisoned, others are then less likely to act the same way.
Countries that have regulated guns see less guns killing people – there are still murders, but less, and specifically less mass murders, and a lot less with guns. The total impact on controlling guns is less weapons available for theft, resale, lunatic fringe hoarding and general craziness.
The simple and obvious flaws in having different gun laws across a country with open borders between states, doesn’t need to be restated.
You don’t have to solve every potential problem to solve the majority of scenarios.
If your reason for wanting a gun I because you are scared of the government or are worried about people who look different to you, the issues are deep and demand a lot of long term work.
Just because there are no simple solutions to complex issues, is not a reason to take no action at all.