You must create a bootable USB installer of the OS you want, startup from that, erase the drive completely using Disk Utility, Reinstall macOS, then migrate you data from a backup made prior to the upgrade. If you don’t have a backup made prior to the upgrade, you will need to manually copy your data before erasing. In that case, Library-based data (Photos, Music, etc) might have been modified by the OS and won’t work with the older OS. You would need to export all of the media out of the Library, then import it into the old version. Metadata stored with the Library (Keywords, faces, tags, etc will be lost). Any files either edited or created since the upgrade must be backed up/restored manually.
Create a bootable installer for macOS - Apple Support
Erasing the drive completely on Apple Silicon might require a DFU reset which requires another Mac.
Most macOS upgrades alter the Mac firmware, so the firmware mismatch might cause problems.
I don’t spend a whole lot of time in Terminal, but it is generally open. I haven’t noticed any issues with it. Maybe there is more to your problem than just the OS.