I would suspect a loose power connection or a short.
Existing, previously working computer or new build?
Update your post to include full system hardware specs and OS information.
Include PSU: make, model, wattage, age, condition.
= = = =
Start with checking all exterior power cables, outlets, and connecting cables to other devices (monitor, keyboard, mouse, etc. as applicable.
Gently wiggle and twist to determine if any of those cables cause the fans to blast or the screens to go black.
However, the problem could be inside the computer.
Power down, unplug, open the case.
Clean out dust and debris.
Verify by sight and feel that all cards, connectors, RAM, and jumpers are fully and firmly in place.
Use a bright flashlight to look for any signs of damage: bare conductor showing, pinched/kinked cables, melted insulation, blackened or browned components, swollen components.