I would create a bootable macOS 11.x Big Sur USB installer using the instructions in the following Apple article:
Create a bootable installer - Apple Support
Since the Open Core Legacy Patcher used to install the unsupported OS was likely used, it modifies the PRAM (aka NVRAM). Perform a PRAM Reset (hold the PRAM Reset for at least three chimes if possible).
Option Boot by holding down the Option key immediately after the startup chime to access the Apple boot picker menu. If you haven't already connected the bootable macOS USB installer, then do so now & select it as the boot device.
Once booted to the USB installer, Now launch Disk Utility and click "View" & "Show All Devices" so that the physical SSD appears on the left pane of Disk Utility. Erase the whole physical SSD as GUID partition & APFS (top option). Quit Disk Utility and select "Install macOS Big Sur".
Instead of using a bootable macOS Big Sur USB installer, you may be able to use Internet Recovery Mode (Command + Option + R) instead, but many times people have run into issues with the online installer, so it is best to at least have a USB installer handy anyway since you need access to a compatible working Mac to create a bootable macOS USB installer.