Here's how to properly install firefox on ubuntu
https://www.omgubuntu.co.uk/2022/04/how-to-install-firefox-d...
and, once you're done:
apt-get purge snapd