Plug this OWC Express 1M2 external SSD into your Thunderbolt port (via USB-C), install Sonoma on it, and then use Migration Assistant to transfer content from your last Time Machine backup to it. Then change your System settings : General : Startup Disk and you are good to go.
The caveat of using a non-Apple drive is any future operating system update/upgrade may want to write new drive firmware to an Apple branded drive, and the installation will fail using third-party storage solutions.
The SSD connector on iMacs, whether only SSD, or Fusion drives is beneath the motherboard and it requires completely disassembling your iMac with substantial risk of collateral damage. A fast, external SSD simply avoids this grief.