Question HP Z230 Wont power on

Jun 16, 2020
28
0
30
I was using my pc normally to browse and suddenly my pc decided to shut down and started beeping red light. It beeps four times then gap then again 4beeps. I have tried removing all items then plugging in one and one still no luck. Tried clearing CMOS , blowing my Pc to remove any dust.
When i press the power button i see a green light turn on for a split second inside the PSU.
Is it just a bad Power supply or is it a bad Motherboard?