imac shuts off during startup
why does an iMac turn off during startup?
why does an iMac turn off during startup?
At which part of the startup sequence does this occur?
Can you get this Mac to startup if you boot up in Safe Mode?
Ref: How to use safe mode on your Mac - Apple Support
What have you tried, so far yourself, to resolve this so that we don't try offering potential solutions that may not have already worked for you?
That sounds like a power or hardware issue.
see > If your Mac doesn't turn on - Apple Support
Check the power connections on the back of the iMac and the wall outlet.
imac shuts off during startup