iMac keeps going black
it crashed when I was using Vectorworks, just went black as if it had gone to sleep, I could get it back on by pressing the power button but a few secs later it would go again. I tried a power cycle and pram reset and booting in safe mode but still does the same thing, it will let me type in password and when I hit enter load for a sec then go black, a few secs later I can hear it power off as if it’s gone to sleep and can hit the power button to take me back to log-in screen. It’s IMac 2019 can’t remember which osx is on it but it’s pretty up to date
iMac 21.5″, macOS 13.4