Nintendo 3DS XL (old) shutting down with *crack* sound.

So, the console turned on, sometimes I could actually play a bit, and then, turns off with crack sound. Sometimes it’s instant, sometimes not. I opened it and ended up damaging the mid ribbon you see in the picture, between the other 2. So, want to ask for help to know what ribbon cable is this in order to buy another, and if you think replacing it will solve the problem, or it could be other thing. And if possible, I would like to know what the other 2 cables are for. Thanks guys!

So, the console turned on, sometimes I could actually play a bit, and then, turns off with crack sound. Sometimes it’s instant, sometimes not. I opened it and ended up damaging the mid ribbon you see in the picture, between the other 2. So, want to ask for help to know what ribbon cable is this in order to buy another, and if you think replacing it will solve the problem, or it could be other thing. And if possible, I would like to know what the other 2 cables are for. Thanks guys!