Let's back up.
It's premature to say that SB 8 "avoids the constitutional restrictions on banning abortions". The constitutionality of SB 8 has not been resolved; the Supreme Court said so explicitly (page 2). In fact there is good reason to think that is unconstitutional under existing interpretation of the Constitution per Roe v. Wade and the like. (Whether the court will actually follow existing interpretation is another question, of course.)
But the courts do not determine the constitutionality of laws just because someone asks them; they only do so when it needs to be decided to resolve a particular case. For instance, if a person is charged with a crime, they can challenge the constitutionality of the law under which they are charged, and courts will address that question unless the case is resolved some other way. There are also ways that a person who wants to violate the law can pre-emptively sue the government to prevent them from enforcing the law, if they can show such enforcement is likely to affect them.
The issue in SB 8 is that since it wouldn't be the government enforcing the law, it's unclear who an abortion provider can pre-emptively sue. In Whole Woman's Health v. Jackson, they tried to sue the State of Texas, its courts, and a private party who they thought might be likely to sue them. The SCOTUS majority found that none of those defendants were relevant. However, if and when an abortion provider actually does get sued, there'll be a clear case which has proper parties and is ripe, and courts then will have to consider whether SB 8 is constitutional or not.
So if your hypothetical gun control statute were treated similarly, the law might avoid pre-emptive challenges, with a chilling effect on gun sales. But sooner or later, someone would probably violate the law (maybe deliberately as a test case), and the courts would consider whether it was constitutional or not. Under prevailing interpretations of the Second Amendment, they'd probably find that it wasn't.
A key difference, of course, is that abortions are much more time-sensitive than gun purchases; being temporarily blocked from having an abortion is much more consequential in most cases than being temporarily blocked from buying a gun.
The other subtext is that, although SCOTUS said their decision in Whole Woman's Health is not based on the constitutionality of SB 8, it's widely suspected that several of the justices are not all that keen on the constitutional right to abortion found in Roe v. Wade, and might look to overturn Roe when it comes up. As such, they may not be very motivated to look for procedural avenues to block SB 8 in the short term, since they might be inclined to uphold it in the long term. The dissenters in Whole Woman's Health certainly thought those avenues were available. But in the case of your hypothetical gun control bill, if a majority of justices were pretty convinced that the law was unconstitutional, they might try harder to come up with grounds to block it pre-emptively.