Your original post indicated a temperature issue.
If you reached 100c, that is the point where your i7-4790K will throttle.
Your photo shows a stock intel cooler.
I think such a cooler is a bit inadequate for your processor and really should be swapped out.
If you were working ok before, it is possible that the cooler has been dislodged or the paste has deteriorated.
See my stock instructions at the end.
I do not think the more sinister explanations of a bad motherboard or psu are likely explanations.
A GTX2060 should run just fine on a 500w psu.
http://www.realhardtechx.com/index_archivos/Page362.htm
A quality psu is a long term investment if you want a psu replacement.
Look for a seasonic focus in 550 or 650w.
Here is one tier list of psu quality:
Credit to @Starelementpokeand @Energycore for helping out with this long-awaited refresh of the old PSU tier list by Aniallation (who previously went several months without logging in), leaving the old list in need of help. This is simply an update of the list that was flawed in creation by the P...
linustechtips.com
True, your case is not good for cooling.
You have only one front intake which I guess might be 120mm,
You could replace the intake with a much higher cfm unit at the cost of more noise.
I might opt instead to buy a more modern case replacement as well as a tower type cooler with a 120mm fan.
----------------how to mount the stock Intel cooler--------------
The stock Intel cooler can be tricky to install.
A poor installation will result in higher cpu temperatures.
If properly mounted, you should expect temperatures at idle to be 10-15c. over ambient.
To mount the Intel stock cooler properly, place the motherboard on top of the foam or cardboard backing that was packed with the motherboard.
The stock cooler will come with paste pre applied, it looks like three grey strips.
The 4 push pins should come in the proper position for installation, that is with the pins rotated in the opposite direction of the arrow,(clockwise)
and pulled up as far as they can go.
Take the time to play with the pushpin mechanism until you know how they work.
Orient the 4 pins so that they are exactly over the motherboard holes.
If one is out of place, you will damage the pins which are delicate.
Push down on a DIAGONAL pair of pins at the same time. Then the other pair.
When you push down on the top black pins, it expands the white plastic pins to fix the cooler in place.
If you do them one at a time, you will not get the cooler on straight.
Lastly, look at the back of the motherboard to verify that all 4 pins are equally through the motherboard, and that the cooler is on firmly.
This last step must be done, which is why the motherboard should be out of the case to do the job. Or you need a case with a opening that lets you see the pins.
It is possible to mount the cooler with the motherboard mounted in the case, but you can then never be certain that the push pins are inserted properly
unless you can verify that the pins are through the motherboard and locked.
If you should need to remove the cooler, turn the pins counter clockwise to unlock them.
You will need to clean off the old paste and reapply new if you ever take the cooler off.
Clean off old paste with alcohol and a lint free paper like a coffee filter.
Apply new paste sparingly. A small rice sized drop in the center will spread our under heat and pressure.
Too much paste is bad, it will act as an insulator.
It is hard to use too little.
----------------------------------------------------------------------------------