Chosen Solution

I tried to put the ribbon cable from the Joy-Con rail back into the motherboard but the plastic that holds the ribbon cable got ripped off and the pins are bent. How do I bent the pins back where it should be?

It’s broke, you will need to replace it. You can find it on Aliexpress for like $4: https://bit.ly/2CH4EwC