The Second Amendment is incredibly simple to understand.
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.
"A well regulated Militia, being necessary to the security of a free State," is a statement of fact and is the reason why the phrase that follows was written.
Well regulated does not mean the government gets to tell who gets to carry which firearms and where - which would go against the very purpose of the 2nd Amendment to begin with. Well regulated means trained and guided for a specific purpose. It's like the air in a firefighter's or diver's SCUBA tanks. The air in the tank is at too high of a pressure to be useful for the purpose for which it exists - to be breathed by a human being. The air must be regulated to become useful for the purpose intended. The purpose of the Militia is to maintain the security of a free state. 1 million men going in 1 million different directions doing their own thing can't do that. It is only when they are guided toward the common goal can they be effective to accomplish that goal.
The goal of the well regulated militia is to maintain the security of the free state. That means defending it against any attack, be it by a government, invader, or standing army that would attempt to establish tyranny, including the US Federal Government. The Bill of Rights was written by a group of men who had just accomplished the violent overthrow of their own government which had become tyrannical and they wrote the 2nd Amendment to ensure that it could be done again, if needed.
The last phrase "the right of the people to keep and bear Arms, shall not be infringed" is the guarantee that enough citizens will remain armed so that they can form a militia, if need be, and be trained and guided to the common goal of maintaining the free state.
If someone wants to get all wrapped in the idea of the right to keep and bear arms as applying only to "the Militia" show them the definition of militia contained in Federal law and watch them cough and sputter...
10 U.S. Code § 311 - Militia: composition and classes | LII / Legal Information Institute
10 USC 311
(a) The militia of the United States consists of all able-bodied males at least 17 years of age and, except as provided in section 313 of title 32, under 45 years of age who are, or who have made a declaration of intention to become, citizens of the United States and of female citizens of the United States who are members of the National Guard.
(b) The classes of the militia are—
(1) the organized militia, which consists of the National Guard and the Naval Militia; and
(2) the unorganized militia, which consists of the members of the militia who are not members of the National Guard or the Naval Militia.
It includes all able body males between the ages of 17 and 45 (up to age 64 if previously members of the Regular Armed Forces) - who are not even required to be citizens of the United States and female members of the National Guard.
The 2nd Amendment actually has nothing in it about personal protection or hunting. It is 100% about being able to defend the freedom of the state from anyone that attempts to enact tyranny including the US Federal Government.
Now, with all that being explained - the truth is that the Federal Government has already infringed upon the people's right to keep and bear (starting with the National Firearms Act of 1934) to such an extent that it has already nullified the 2nd Amendment.
One could effectively argue that the National Firearms Act of 1934 was actually the first step taken by the Federal government to establish tyranny.