Since you already have the 24volt supply, and the 24volt relay module, connect both like this.
Remove the JD-VCC jumper (throw away).
Connect the 24volt supply(+) to the JD-VCC pin (not to the VCC pin!!!)
And supply(-) to relay module ground.
Connect VCC of the long strip to Arduino's 5volt pin, and the relay inputs to Arduino output pins.
DO_NOT_CONNECT_RELAY_GROUND_TO_ARDUINO_GROUND.
Power the Arduino with a separate 5volt supply (e.g. 5volt cellphone charger on the USB socket) if you want opto isolation (safer if you are switching mains powered devices).
Or use that buck converter you have if you don't care for opto isolation.
In setup(), write a HIGH to the relay pins BEFORE setting the pins to OUTPUT with pinMode.
digitalWrite(relay1Pin, HIGH);
pinMode(relay1Pin, OUTPUT);
That will stop relay chatter during bootup.
Gronjus:
Current needed to make the relay toogle is about 15 or 20 mA which can be given by the arduino.Refer to this link, there's two pictures that explain surely better than me
: Step 2: Interfacing the relay modules to the Arduino | Hobbyist.co.nz
Make that 2mA pin sink current.
The link is for a different non-opto isolated relay board.
Leo..