The Constitution is a living document. There are limits on the First Amendment, as there should be. There should also be more limits on the Second Amendment.
When the Constitution was written, we did not have the Internet and related issues of child pornography. We agree to limit that kind of free speech without threatening the First Amendment.
When the Constitution was written, we also did not have rapid-fire assault weapons. The Second Amendment was written with muskets in mind, and in reference to a well-armed militia.