The simpliest is to check with a computer using a specific program. You need to enter the command section, find the compressor temperature sensor and check the temperature. If it has stucked when overheated, it will show a constant temperature in excess of 120-130 degrees. That is, it will show a constant high temperature. Because of this, there will be an error and the system will not work.
If you check without a computer, you need to remove the protection, disconnect the connector from the sensor, take a multimeter, set the selector to measure the resistance with a threshold of 20 kOhm and measure the resistance of the temperature sensor. If the sensor is in good condition, the multimeter will show resistance from 14 to 20 kΩ. Sometimes, resistance can go as high as 21-22 kΩ. Everything will depend on the air temperature outside. If the compressor temperature sensor is jammed, the multimeter will show a resistance of about 1000 ohms. If the sensor has stuck on overheating, the multimeter will show a resistance of approximately 300 ohms.