I'll share my experience here. I have this exact problem on my right joycon where none of the buttons except the pair button, the joystick button and the joystick itself works.
Basically one of the buttons got "stuck" in pressed state. (either electrically or mechanically, the latter is easier to notice.) and that causes the joycon to not respond to any other button presses. Mine started working again after I removed the right trigger button's ribbon cable. And became unresponsive again after I plug that back in.
What I recommend doing is following this guide to take the joycon apart, and start unplugging ribbon cables until the joycon start working again:
Reemplazo de Botones Joy-Con derecho de la Nintendo Switch
If the "stuck" button happened to be on a ribbon cable, then you can order the ribbon cable with the button and replace it. No soldering required
If it's a button on the board itself tho, then unfortunately it's gonna be more difficult. I recommend using multimeter to further troubleshoot it, and try to solder on a new button. Or just buy a replacement board.