You are cherry picking 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."
The 2nd amendment is about a militia or back then ensuring that the military was not weakened. The sentence starts off with militia that means the entire sentence refers to the militia. Which means the military.
In 1939 the U.S. Supreme Court considered the matter in United States v. Miller. 307 U.S. 174. The Court adopted a collective rights approach in this case, determining that Congress could regulate a sawed-off shotgun that had moved in interstate commerce under the National Firearms Act of 1934 because the evidence did not suggest that the shotgun "has some reasonable relationship to the preservation or efficiency of a well regulated milita . . . ." The Court then explained that the Framers included the Second Amendment to ensure the effectiveness of the military.