Taxing activities that have negative externalities is a positive use of taxation.
It's better than forbidding such behavior for many reasons. The simplest reason is that it's better to make revenue dis-incentivizing something bad (pollution) as opposed to dis-incentivizing something good (income).
To the extent that I would agree, it would IMO only be ethical for a government tax negative externalities to directly pay for mitigation, control, etc , i.e a carbon tax that directly goes to carbon removal / capture.
taxing exernalties then using the money for unrelated projects i.e taxing cigarettes to pay for schools, is something I would oppose
Taxing negative externalities works to reduce those externalities even without mitigation though. I’d much rather have a government that taxes things we want less of than things we want more of. The status quo is income tax, which is far worse than any Pigovian tax.