In my dining room, there is a 2-gang switch box that houses two switches. Switch A is on a completely separate circuit from Switch B. Switch A controls a single light in the dining room, and is the only switch that does so. A while back, I replaced this with a Kasa smart switch, which went very smoothly. I left Switch B there. Switch B controls a light in the adjacent kitchen, and is a 3-way switch - there is another switch in the kitchen that does the same thing. Switch A's circuit is shut off at the circuit breaker in the basement, Switch B is one of the circuits in the box in the kitchen. There are neutral and ground wires in the box.
Yesterday, I went to replace the smart switch (Switch A) with a smart dimmer switch, and remove Switch B, connecting its line and load wires with a wire nut in order to make the other switch in the 3-way configuration the only one that controls the kitchen light. I joined the neutral wire that was attached to this switch to the rest of the neutral wires (I don't fully understand neutral wires). It seems like there were some issues with this process. When I first restored power to both circuits, Switch B's light remained off (I don't think the breaker was tripped though), as did Switch A's. I found that some of the ground and neutral wires were loose since there were too many for the wire nuts, so I fixed that. Switch A worked as expected, but the light was still off for Switch B (not sure if this was because it was tripped).
At this point, I tried using a wire nut to join Switch B's neutral, line, and load (which I now understand is a bad idea), but this tripped the circuit breaker. I restored it to the previous configuration, but the circuit breaker remained tripped when I tried to turn it back on. I read that sometimes you need to push the circuit breaker harder when you turn it off, and got it to turn back on by doing so (at which point the rest of the appliances on the Switch B circuit turned on, but not the light it controls). A slight jostling of the wires caused it to trip again, though, and now it won't turn back on. I have made sure the neutrals and grounds are all in contact, Switch A works normally, and I've opened up the other switch on Switch B's 3-way configuration to get a picture.
Here is a picture of the box from when I was taking out the original non-smart switch, in which you can see Switch B still in there, with a red wire and white wire visibly attached:
Here's what it looks like now with Switch A on the right and the red and black wires joined:
And the other 3-way switch on Switch B's circuit in the other room:
Breaker box:



