Firstly, check all your wiring - especially the earth/ground. If you’re absolutely sure about that then the best way to troubleshoot this kind of stuff is just to bypass the other critical switch components (e.g. pressure switch, compressor relay)
If you’ve got the all-in one blue type pressure relay/switch from Hornblasters then you won’t be able to do much else other than wiring the compressor directly to a 12V battery to make sure it runs. If that works then you need to replace the pressure switch/relay.
If your rig has separate pressure switch and separate relay for the compressor then you can bypass each in turn to see which one is at fault.
Most of the times it’ll just be a loose wire or connector.