Downgrading is not a trivial process. Make sure it is what you want/need to do before your proceed.
Downgrading will require that you erase the startup drive. This will wipe everything.
From there you must reinstall an OS that is compatible with your Mac - assuming Mojave here - and then reload all of your user files and data from a backup.
If I may, why do you wish to downgrade to Mojave?
MacOS Catalina sits between Mojave and Big Sur. Have you considered that avenue? It will still require wiping the drive and reinstall the OS.
Downgrading your macOS to an earlier version will erase all the data from your drive and will require that you follow these steps:
1) Back up your Mac with Time Machine (or other backup solution) to an external disk drive.
2) Have available an installer for the previous version. This can be a Time Machine backup made with macOS Catalina or earlier prior to your upgrade to the current version, or it can be a bootable USB installer (recommended) for a previous macOS created on a USB flash drive. You can get old versions of macOS here. Optionally, a previous version may be available on an Intel-based Mac if you use Shift-Option-Command-R startup key combination during startup. You may be offered the macOS that came with your Mac, or the closest version still available
3) Boot your computer in macOS recovery mode and erase and format the drive in preparation of reinstalling the previous OS. This step will erase all of your stored data.
4) Reinstall macOS on your computer using your prepared USB installer or the Time Machine backup made with the older macOS. You may also reinstall the macOS version that is offered at the macOS Utilities screen after booting in Recovery mode.