Note the diagram. With the ac on, vehicle in park, engine running, raise the hood, when problem is ongoing, is the compressor clutch engaged? Sometimes, you can tell. The top circle is ac relay. The bottom circle should be magnetic clutch/compressor. At the compressor clutch, top wire in diagram, I believe it is green and yellow, It should have voltage, use a test light to check. It appears to ground through compressor body. Voltage and grounds are important.
The compressor body won't get any voltage unless ac relay is energized. Top circle. The relay has two sides, load side and control side, The load side is that line with arrowhead, the control side is the right side, in the circle. You can see ac fuse above relay. The control side needs voltage and ground.
Another thought, temp door under the dash has a problem? Any applicable trouble codes?