I believe that it is mostly uncontroversial that it is constitutional for a state to tax firearm purchases at a reasonable rate. If a state had a law imposing a 10% sales tax on all firearm and ammunition purchases, this might be politically controversial, but I believe that most people would accept that the law is constitutional.
What if the tax rate is set to 50%? 100%? 1000%? Above a certain point, I would expect that an extremely high tax would be seen as equivalent to a ban. It would be a major loophole in the Second Amendment if the government could say "sure, you can buy that gun for $1,000, but only after you pay $1,000,000 in taxes." At what point are sales taxes on constitutionally protected sales unconstitutional?
(I'm using firearms as an example, but the question applies equally to any case in which something can be taxed but not banned.)