Isn’t it ‘...necessary to the security of a free State...’?
“A well regulated Militia, being necessary to the security of a free State, the right of the people to keep and bear Arms, shall not be infringed.”
That means we have to define ‘State’ and ‘infringed’, doesn’t it?
Since the Founders were against a standing army, they were hoping state militias would be able to do the job. (The War of 1812 demonstrated how wrong they were).
In addition, state militias would prevent the federal government from acquiring power by force. The second amendment was to ensure that state militias were not disarmed by federal action.
Individual gun rights were protected by state constitutions -- which is why gun laws vary from state to state. At least, that's the way I read it.