Intermittent faults are the worst to troubleshoot. If you haven't changed anything recently software wise, I can only assume it must be a hardware fault, but exactly what is hard to tell.
Sonic Mania Plus is a great android, this is also a very helpful post. I play this game on my PC in the new version of the Sonic Mania Plus Available to download.
I may try the new ram site, and download more RAM to my Switch. Not sure if ddr3 is the right ram
for it tho. Edit- no it uses floppy Ram, just like @AncientBoi