At 1st glance, motors need kickback diodes.
The Arduino looks like it might be powering too much load from the 5v pin.
The relay board relays should be powered from an external supply.
In the Arduino IDE, use Ctrl T or CMD T to format your code then copy the complete sketch.