We can install Firefox in Ubuntu with five steps
Step 1: Remove the Firefox Snap by running the following command
sudo snap remove firefox
Step 2: Add the (Ubuntu) Mozilla team PPA to your list of software sources by running the following command in the same Terminal window
sudo add-apt-repository ppa:mozillateam/ppa
Step 3: Next, alter the Firefox package priority to ensure the PPA/deb/apt version of Firefox is preferred. This can be done using a slither of code from FosTips (copy and paste it whole, not line by line)
echo ' Package: * Pin: release o=LP-PPA-mozillateam Pin-Priority: 1001 ' | sudo tee /etc/apt/preferences.d/mozilla-firefox
Step 4: Since you’ll (hopefully) want future Firefox upgrades to be installed automatically
echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox
Step 5: Finally, install Firefox via apt by running this command
sudo apt install firefox
I Hope these steps will help you
SOURCE:[OMGUBUNTU][1]
[1]: https://www.omgubuntu.co.uk/2022/04/how-to-install-firefox-deb-apt-ubuntu-22-04#:~:text=Installing%20Firefox%20via%20Apt%20(Not,reinstalled%20at%20a%20later%20date.