MOSFET datasheet "continuous current" values are complely bogus marketing values. Basically, they can be achieved with infinite, imaginary heatsinks, or running the device in liquid nitrogen, for example. (In some rare cases, they do publish alternative "continuous current" values which assume a realistic operating temperature, and a certain, specified, amount of heatsinking. These numbers are typically around one third of the "marketing" values.)
They are not lying, per se. They are giving numbers in totally unrealistic conditions. Be careful, always read what conditions the numbers were given for. It's like specifying gas mileage for driving downhill only.
So you need to understand what values are valuable, and calculate for your case using these numbers. I'm referring to this datasheet:
https://www.vishay.com/docs/91406/sihfz24.pdf1) Check your gate voltage. The Rds(on) is higher with lower gate voltages. To minimize Rds(on), use the maximum safe gate voltage. 10V is very typical for these MOSFETs.
2) Check your component supply. IRFZ24N and similar older MOSFETs are widely sold as fakes on Ebay and Aliexpress. The fakes tend to have much larger Rds(on).
3) Note that the rated Rds(on) is at 25degC
die temperature. Start the first order approximation by multiplying the Rds(on) by 1.5. This would estimate the Rds(on) somewhere around 120 degC die temperature.
4) Find the Rds(on), worst case value: The datasheet says 0.10 ohms at Vgs=10V, at room temp. -> go with 0.15 ohms.
5) Calculate the power loss: P = I^2*R = (6A)^2 * 0.15 ohms = 5.40W
6) Find the thermal resistance numbers for your specific heatsinking. You are not using any heatsink, so the number is directly available: Rth Junction-to-Ambient = 62 degC/W
7) Calculate the temperature rise, and temperature: dT = 5.40W*62 degC/W = 334.8 degC. At ambient temp of +50 degC, die temperature is 384.8 degC. Absolute maximum rated is 175 degC. You have your answer here.
Now, with a heatsink? They give you the numbers. Junction-to-case = 2.5 degC/W. Case-to-sink = 0.5 degC/W typical. Now pick a heatsink - they are rated by the thermal resistances. Say you pick a heatsink rated at 2 degC/W. The total thermal resistance will be 2.5 + 0.5 + 2 = 5 (degC/W). Calculate the temperature rise again: 5.40W*5 degC/W = 27.0 degC. At +50 degC ambient, die temperature is 77.0 degC. This would clearly work.
In DC (rarely switching, not thousands of times per second) applications, where you don't need to consider switching losses, it's often wise to pick a MOSFET with Rds(on) low enough so that external heatsinking isn't needed: silicon is cheaper today than aluminum heatsinking! Often, picking a $2 transistor instead of a $1 device allows you to save several $ on the heatsinking. A TO-220 cased device can burn about 1W without any heatsinking, so you would need a bit under 20mOhms rated Rds(on) to get rid of the heatsink.