If you have done some tweaks or applied some extensions, disable them immediately. If you want to remove the tweaks tool completely, run the following command-
sudo apt purge gnome-tweaks
sudo apt purge gnome-shell-extensions
If you still experience the same problem, create a live bootable CD or USB flash drive by using the built-in tool of ubuntu "Startup disk creator".
Backup the contents of the usb flash drive, as the contents will be lost.
Download the .ISO file of ubuntu and reboot your computer. Hope you have Backed up your files in your computer.
Then , press F12 or F9 or any other keys to interrupt normal startup according to your manufacture and select the usb drive in the boot menu.
The you will see ubuntu loading and doing a process called disk check. If you want, you can run it, or you can press CTRL+C to skip the disk check. Then, you can see "TRY UBUNTU" and "INSTALL UBUNTU". When you click on install ubuntu, there will be options like
- Erase ubuntu 20.04 and install ubuntu
- Erase disk and install ubuntu
Click on erase ubuntu 20.04 and install ubuntu. Then you will get a fresh ubuntu installation without any errors. Hope you found my answer useful.