Welcome. We would like to help you but we need more information which is explained on the guidelines for this Forum. Start by posting an annotated schematic with links to technical information on each of the hardware devices. Frizzy pictures are wiring diagrams and are basically useless for troubleshooting problems. I will spend my time helping others that did post a schematic and the necessary information, obviously they read the guidelines.
Using the TXRX pair on UNOs to communicate to other UNOs is fraught with difficulties because those lines are also driven by the interface IC of the USB connection. It can be done, but only with forethought. Better to use software serial at 9600 Baud for the UNO-UNO connection, on two digital pins of your choice.
Also,
Yes, you need a ground connection between your UNOs.
Yes, your for loop is incorrect; rethink the "; sizeof(buf);" part.
Yes, your LEDs need series current limiting resistors, regardless of what countless examples, Youtubers, etc. have done or attest to. Just do it.
And, although not wrong, your dip switch inputs are needlessly complex. Read about "INPUT_PULLUP", and rewire.
Finally, although we tend to "hate on" breadboard sketches and the like around here, at least you've begun by attempting to communicate effectively. A schematic would be better, but for the present need your image is fine.