Monterey 12.5 not sleeping
My iMac was running Monterey 12.5 before a fouled up computer caused me to have to replace it's "failing" HD (part of a Fusion drive) with an SSD. I then installed only programs that were essential to me.
The computer that was extremely sluggish and unreliable before the new SSD would sleep very reliably and, when it was put to sleep manually, stay in sleep mode. So, the version of macOS seems to be ruled out as a culprit
The newly installed Monterey 12.5 with minimal programs will not put itself to sleep or even stay in sleep mode when put there manually.
I found a previous thread that mentioned an AV program as interfering with sleep, but I don't have any AV installed other than free Malwarebytes.
In Windows, there are terminal commands to tell what was the last process to wake the computer from sleep. Are there any such commands for macOS that would give me a clue as to what's wrong?
iMac 27″, macOS 11.2