If you re having problems with the Arduino code then you might have better luck posting to an Arduino forum.
But if I can guess a bit about your setup, I’m guessing you have a relay board attached to this Arduino. The Arduino subscribes to MQTT topics to receive commands.
Have you verified that what ever you are sending the MQTT messages is working in the first place?
It would be a lot easier to read the code if it were in How to use code fences.
A quick scan through the code doesn’t show where you connect the subscription to call your callback function, but I don’t know this library so maybe that’s handled for you?