Good that you fixed yours, curious 'how' you fixed it though as there are other screws that ensure a good connection to the metal frame (those either side of the USB C connector for example). I'm wondering if you instead have a dodgy connection somewhere (bad solder joint) and tightening down those screws simply flexed the board a little and (temporarily) made good the connection. I say this because I recently repaired a Switch with no HDMI video output when docked, I ended up replacing the USB chip (on the rear of the board, chip info: PI3USB30532ZLE) but that didn't help. So I put back the old chip and the HDMI video was back. Looks like it was a bad factory solder joint in my case.
As for your cart port, did you disconnect it at any stage? There's no reason why it can't be removed, I've done this on quite a few from Switches that I've repaired, put them back in again and all is well. Check that the wide Flat Flex Cable is properly inserted into its connector, that the pins are good and clean and not damaged, that the plastic locking clip is pushed down (be careful, they break fairly easily!). The same applies to the press to fit connector - if you misalign that (easy to do!) and press down too hard you can bend pins. In short, be careful, the connectors in the Switch are very small and easy to break. Check inside the cart slot too - is it clean?