I have a 2020 iMac and I dont turn it off at night. Will this hurt the SSD I have a 2010 iMac that I used until recently. It has an internal Fusion Drive. I seldom ever turned this iMac off. I just let the screen saver kick in. The iMac worked great for 10 years and is still working as i write this.. I recently got a 2020 iMac and now I'm curious if leaving it on for 24 hours a day will hurt anything, especially the SSD.  Thanks.
Yes, you will be wasting energy and cooling and no the hardware won’t suffer (especially if you let the backlight go off).
Power cycles cause our Macs to fail three to five years before those we leave on all the time. The longest running Macs we have are the ones that run always.
We happily replace batteries and drives when they fail, but the stats are clear for us that if you can leave the gear running, you generally have the longest life. We don’t have as many iMacs as mini and pro and even laptops in rooms due to space, but I see no reason why their engineering would be any different than the rest.
This pattern followed from the Motorola to PPC to Intel transitions and I can’t wait to see how Apple Silicon changes the hardware and what doesn’t change.