First, this is a metal box. The ground wires need to attach to the metal box first. If you're learning off the Web, you see stuff where they get grouped and then pigtailed to the switches - that's on plastic boxes. On metal boxes, grounds go to the metal box. The switches pick up ground automagically via their mounting screws and their metal yoke (mounting flange).
If the switch has no metal yoke, then take a close look to confirm the switch is actually UL-Listed. (ETL and CSA also permitted). If all you see is "CE", "CCC", "FCC" or "ROHS", those are the typical fake markings placed on unsafe, cheaply made junk sold mail order. These don't have the numerous safety elements required to switch 120V safely, such as use of the proper (expensive) borated plastics so the thing doesn't "burn like plastic" and spew toxic smoke that impedes your escape.
As to your confusion, here's a rule in NEC. "No buried splices". Every cable must end in a junction box, and the junction box cover must be accessible. You may be expecting there is a hidden wiring trunk that distributes power. Actually no... power distribution is handled inside the existing switch and outlet boxes, via extra wires for that purpose. For instance most receptacle boxes have not only the needed black and white wire, but another pair carrying power onward to the next outlet. The same occurs in switch boxes.
You found the blacks already connected to each other (also with pigtails to the old switches). You removed the pigtails, which was fine; but you also stopped them from being connected to each other. That is what broke the downline circuit.
It looks like in your box, except for the 3-way switch, the wires conform to ideal colors: white for neutral, black for always-hot, and red for switched-hot to a lamp. Should be straighforward attaching those to a smart switch.
The 3-way wires will be different and weird. That's just a 3-way thing. Those wires should not interact with these wires (except for the ground wire, which again should go to the metal box).