This reads like you don't have an external backup like maybe created by the free Time Machine app? If so, you can buy the replacement Mac and restore from the Time Machine backup. That should get you back to just about exactly where you left off (up to the very last hour of new file creation may be lost at most).
However, if you have no backup, you might take the iMac in to see if Apple can get it going again. It could be as simple as a dead power supply. If Apple can't get it going, you probably want to get the drive out of it (either you do it or if not comfortable, get a local shop to do it for you), install it in an enclosure or a bare drive dock and then use Migration Assistant on a new Mac to basically restore from that drive.
OR, you may want to start over from scratch with a new Silicon Mac and bring over only what you know you want on the new machine from that old drive. Manual migration like that may be something you do slowly- as you realize you need files that were on the old iMac- over weeks or months or even a year or two. This option will likely be "cleaner" than using Migration Assistant... but more complicated and likely to take a good while to actually get everything over that you will want to use on the new one.
Whether paragraph 2 or 3, ASAP after setting up your new Mac, set up Time Machine and back it up to at least one external drive... but ideally TWO drives with a goal of storing one of the backups offsite (to protect against fire/flood/theft) and regularly rotating the on-site TM backup with the off-site TM backup drive. I swap my TM drives on a monthly schedule but your amount of time should be driven by how quickly you are creating new files (NOT yet backed up on the offsite drive).
A good test to determine that is imagine a catastrophic loss (fire/flood/theft). At what point since you last took a fresh backup off site would feel like you lost too many new files to recreate from scratch? Maybe that's also monthly? Maybe that's weekly? Bi-weekly? Whatever the answer, rotate your two TM drives on that schedule and you'll never be in a spot where you appear to be right now.
Most people gain massive attraction to creating backups in THIS situation- when they are facing a potential loss of access to all of their files. In your case, loss risk is low... but you need access to the drive in what is probably a dead Mac. Getting it out of there should put it back in use, so you can recover your files. If so, consider yourself lucky if you have no other backup. If the drive itself failed, you may have no economical way to recover data and be learning about options that can cost up to THOUSANDS to recover your data.
When you get it back, get your backup strategy and hardware in place so this can never happen again. It could be much worse next time.