The Supreme Court and the US Constitution.
I think there is a basic missunderstand about the US Constitution, many people believe the Constitution "gives them rights", but they are wrong. The US Constitution is just confirming their "inalienable rights." in law and describes the roles and responsibilities of the arms of the government and citizens.
The aim of the Constitution when written was to protect the citizens from Government overreach. The constitution was written to limit the power of the government over its citizens, not to grant the citizens their rights.
I believe the Supreme Court got this latest ruling right in law and I'll explain why. All amendments in the US Constitution carry the same weight with the Supreme Court, none hold more power than others. Lets look at the effect of the laws imposed by the State of New York on the 2nd amendment, they require that applicant must “demonstrate a special need for self-protection distinguishable from that of the general community.” and “good moral character”. This puts restrictions on the citizens of NY State's 2nd amendement rights compared to other citizens of the USA, which makes these laws in NY clearly unconstitutional. (Personally I think the lawyers acting for the State of New York made a massive mistake allowing this case to reach the Supreme Court, they must have fully understood the ramifications of losing this case, not only for New York but for many other States that has put restrictions on the 2nd amendment. According to reports in the press Connecticut, Delaware, Rhode Island, California, Hawaii, Maryland, Massachusetts and New Jersey who have similar laws that legislators will now have to rewrite to comply with the Supreme Court ruling, or risk facing legal challenges that their current laws are unconstitutional. The Supreme Court ruling does not immediately nullify or revise these state laws; it just makes clear that they are unconstitutional, effectively forcing state officials to revamp them).
The 2nd amendement was proposed by James Madison to "allow the creation of civilian forces that can counteract a tyrannical federal government", he made it very clear in his writings and speeches that the 2nd amendment was there to protect the people against their government. (I fully understand the arguements about "militia" but that has been settled in law in the USA, so there the debate about it in law is over).
Now lets look at other other amendments and see how state's puting restrictions on them could effect them. Lets take the 1st amendment, "Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances". What if the state of California decided to pass a law saying that free speach was only available with-in the home or at public and government meetings, it was to be restricted in traditional public forums, such as the public sidewalk or public parks because what you say may "offend" someone. Would that be okay with people, I think not. There are some restrictions on free speach where they conflict with with other laws and freedoms, they include obscenity, fraud, child pornography, speech integral to illegal conduct, speech that incites imminent lawless action, speech that violates intellectual property law, true threats.
What about the 6th amendment which among other things says "a person accused of a crime has the right to confront a witness against him or her in a criminal action". Now what if a state like Texas passed a law that said "you only have the right to confront your accusers if you can show you have the funds to pay their legal cost if you lose your case". I've heard many times over the years people claiming that a defendant who loses their case should pay the legal cost of the prosecution and the court. It should not be a burdon on the tax payer, but the tax payer should only pay for a public defender, so everyone has the right to legal representation. This would be a restriction on your 6th amendment.
I'm sure I could come up with many more and better examples of restrictions on an individuals Constitutional rights if I had time, but my point is, you can't just apply restrictions on rights you don't agree with, it is the thin end of the wedge. If you allow your government to restrict some rights without complaining they will end up restricting all your rights.
I'm not a gun rights activist and opposed Bolsonaro new gun laws here in Brazil, I'm just pointing out that as a matter of law the Supreme Court were right in this case. If you allow your government to whittle away the rights you don't agree with they will for sure at some point do the same to rights you agree with.