If your desktop does not come with the latest Firefox browser pre-installed, then you have to follow this guide to install Firefox properly.
==================================================================================================================================================================================================
wget -O firefox.tar.bz2 "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-US" -P ~/Downloads
(It will download the file directly to the ~/Downloads folder)
cd ~/Downloads (Go to the folder where the download has been saved)
tar xjf firefox.tar.bz2 (Extract the contents of the downloaded file)
sudo mv firefox /opt (Move the uncompressed Firefox folder to /opt)
sudo ln -s /opt/firefox/firefox /usr/local/bin/firefox (Create a symlink to the Firefox executable)
sudo wget https://raw.githubusercontent.com/mozilla/sumo-kb/main/install-firefox-linux/firefox.desktop -P /usr/local/share/applications (Download a copy of the desktop file)
==================================================================================================================================================================================================
Information source: https://support.mozilla.org/en-US/kb/install-firefox-linux#w_install-from-your-distribution-package-manager-recommended
After these steps, Firefox should be installed on your system, and you should be able to launch it from the terminal by typing Firefox or from your applications menu.
==================================================================================================================================================================================================
Finally, reboot the system with: sudo reboot.
##################################################################################################################################################################################################
2nd Way- Alternative way of installing Firefox:
##################################################################################################################################################################################################
snap remove --purge firefox (This command will remove the pre-installed Firefox Snap package)
sudo apt remove --autoremove firefox (Completely remove firefox old files)
sudo add-apt-repository ppa:mozillateam/ppa
sudo nano /etc/apt/preferences.d/99mozillateamppa (Copy following code in Nano Editor Window)
<!--------------Code Start----------------->
Package: firefox*
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 501
Package: firefox*
Pin: release o=Ubuntu
Pin-Priority: -1
<!--------------Code End------------------>
sudo apt install -t 'o=LP-PPA-mozillateam' firefox (Install Firefox from PPA)
==============================================================================================================================
Now firefox should be installed successfully. If needed then run reboot.
##################################################################################