I was messing around with a Mid2011 iMac, could only achieve High Sierra
I updated the hard drive to a SSD and doubled the ram
I used OCLP to download Sonoma and let it do its thing
after bootup, had no wifi and bluetooth issues
ran the OCLP root patches and rebooted, reset nvram/pram 3 times in a row and wifi and bluetooth started working
all seemed fine until the use of Logic, the play head required metal to actually make it appear, and seeing as this mac was too old, didn't have metal support
anyway, i had created a High Sierra bootable USB stick prior to this as was using it to fix a family member's mac
Booted up with it and erased the drive and did a clean install of high sierra
so if you happen to have a usb installer that has a previous version of mac on it, then boot boot from that and erase everything and start again from fresh
or use another mac to create the installer:
Use an external drive or secondary volume as a startup disk from which to install macOS.
support.apple.com