How To Read The 2nd Amendment
"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."
Four clauses. When diagramed, the middle two clauses can be dropped out as secondary to the core idea: "A well regulated Militia...shall not be infringed."
Now, let's look at the four clauses individually.
"A well regulated Militia..." back in the day this mean showing up for regular drills, being part of a formally registered group of people who would be called into action should the State need it, not an anonymous unofficial mob. Clearly "own any weapons you want and we won't bother to keep track of them" runs contrary to the founding fathers’ intent.
"...being necessary to the security of a free State" refers to the well regulated militia and establishes it exists for the State's purpose. Now, it's true the rest of the document establishes a government of / for / by the people (as Lincoln would later observe) but nonetheless the purpose of the militia is to protect the State.
"...the right of the people to bear arms" is in the context of the free State. This was an era before Federalism became the dominant political philosophy, there were plenty of arguments for the United States being an alliance of independent states under a national banner as opposed to a single national government sub-divided for administrative purposes into regional states. In that context, "the right of the people to bear arms" clearly refers to a well regulated state militia as opposed to a standing national army.
"...shall not be infringed" refers back yet again to the aforementioned "well regulated militia". Well regulated, both then and now, means knowing who is a member, what arms they possess, enforceable codes of conduct, etc.
Those who would like to point to the examples of Switzerland and Sweden as countries where civilians keep military grade weapons in their homes, please, feel free to do so.
Note, however, that virtually all adult males (except the crazy and the criminal) are members of their nation’s military reserve, that they show up regularly for drills and once a year for field training, that the weapons and ammunition, are scrupulously accounted for, are checked by unannounced spot inspections, and if anybody breaks the inspection seals on said weapons, there is hell to pay.