Last week we had no electricity and next day the imac start with the message "you turned off your computer because of a problem". I see the monterey wallpaper and my login. After typing my password the system goes to my normal desktop.
The Problem is that this occurs every time I start the imac. Anybody have an idea to solve this problem ?
That message implies a Kernel Panic, presumably caused by the power cuts. Something has stayed corrupted so happening every boot.
I would start by booting to Recovery and running Disk Utility > First Aid.
You could also do a Safe Boot which clears some caches.
How you do those depends whether you have a Silicon or Intel Mac, but Google has the answers
There are some other things you can do like reset PRAM and SMC but these also depend on type of Mac.
If none of the above work you could re-run the installer from Recovery, without erasing first.
If that doesn't work, you would probably need to erase, install, migrate from backup, but don't think it should come to that.