Despite some contemporary opinion, there is no historical evidence, except for a bit of Thomas Jefferson’s political writings, that the Second Amendment to the Constitution was designed to ensure that Americans could, if necessary, rise to remove a tyrannical government.
The Founding Fathers had fought hard through a nasty rebellion, and did not want to empower citizens to fight another one.
The founders fostered and promoted local militias to eliminate the need for large standing armies or federal militias — which indeed might be used for tyrannical purposes. Popular militias were designed to replace federal soldiery, not to fight it. This was about law enforcement. The amendment itself reads quite conservatively, with a “well-regulated militia” (no rabble wanted) to support the “security of a free state.”
Some Constitutional thinkers who cite the amendment as empowerment for rebellion are flamboyantly reinterpreting the amendment to meet a perceived 21st century need.