@wwhouseww OK, since I rarely use direct pin control, rather always Virtual pins and code, it took me a bit to figure out, but here is your issue…
Using set pin to allows a range of numbers, as in PWM, so 0 is “ON” for your relay, but so is 1… and probably anything up to around 512… at which time there might be enough change to trip the breaker… use 1023 instead and that would set the pin fully HIGH or “OFF” for your relay.
Or just use the easier option and use turn ON pin and turn OFF pin instead