Chosen Solution
It will flicker black a few times than back to the game I was playing
Which screen is glitching out? It’s most likely a loose connection or a dying cable. Try taking it apart and putting it back together. If that doesn’t fix it, look into a new display data cable. Here are instructions for opening it up. It’s tedious but you can do it! Nintendo 3DS Upper LCD Replacement