Did you try running First Aid while booted into Recovery Mode? If you are using an Intel Mac, then try booting into Internet Recovery Mode using Command + Option + R instead to access the most recent version of macOS installer. Unfortunately some Macs may only boot to the oldest online installer instead regardless of the key used for booting.
Within Disk Utility you can select the volume and click the "Unmount" button. If you are planning to erase the drive anyway, then force unmounting is Ok.
If your Mac still boots normally or into Safe Mode, then I highly recommend creating a bootable macOS USB installer so you may more options available (2018-2020 Intel Macs probably won't work in many cases to boot from USB especially if the internal SSD has been erased). If you have an Apple Silicon Mac, then you can use a firmware "Restore" to push a clean OS onto the internal SSD if you have access to another Mac running macOS 12.4+.
FYI, it really helps to know the exact model Mac so we can narrow down the possible suggestions to just your particular hardware.