Broken custom connectors... how fun.
Flaps are usually just to secure it down and provide a token force. The issue more tends to be dropping it or waving it around and internal momentum dragging it out (at which you get to open it up and pop it back in).
Fortunately for you if it is just the bar on top then if you don't plan on opening it back up much you might get away with a drop or three of some nice adhesive* (hot snot might do in a pinch but I would rather some of the stuff like they use to hold capacitors down).
*put the ribbon in, hold it down with a plastic spudger or whatever, few drops of whatever adhesive it is and let it cure at least a bit before removing the spudger and carrying on.
If that is not going to work then you can see about salvaging it from a board, be it a switch or some random device that has the same (I don't know of any here). Usually easier said than done as too much heat does not do well for these but is possible.
Beyond that then you get to find a board to ribbon/cable/wire aka FPC/FFC (flat printed circuit/flat flex cable) offering (
https://www.molex.com/molex/products/group/ffc_fpc_connectors ) with the right pin count (or maybe greater and some fiddling), right pin pitch, right pin direction... on the usual suspects for electronics parts.
Places (UK versions but they are in most countries)
https://uk.rs-online.com/web/c/connectors/pcb-connectors-wire-housings/fpc-connectors/?sra=p
https://www.digikey.co.uk/products/en/connectors-interconnects/ffc-fpc-flat-flexible-connectors/399?k=fpc connector
https://uk.farnell.com/w/c/connectors/ffc-fpc-board-connectors/prl/results?st=fpc connector&sp=y
In the likely event the vendors don't have much of anything, I will just assume Nintendo will laugh in your face, and if you did track down the original maker of it then "minimum order = about the cost of 4 brand new switches" then you can figure out what wires are needed (get some nice enamel coated ones, broken headphone cable being where many source it) and solder enough of them between the ribbon and the board to make things do what you need. I have done it. It is very tedious and was only done as this was a "this is responsible for 30% of my business" type scenario.