not sure what is the issue, but while using mame core some games cannot load and ends up with freeze of switch showing error 2168-0002.
It must be something in between sxos and retroarch. my card is fat32, emunand 6.2.0
In all honesty mame is a beast in of it's on when it comes to emulation. There is a lot of moving parts with that. The version of mame are very specific to what roms it can read. It is mostly likely do to your romsets not matching what the version of mame you have can read. I don't know much about mame personally, but it takes tweaking to get working correctly.
If you have it working on your computer lets say, you can take that romset and make sure the mame core you have on your switch is the same and theoretically it should work.
Maybe someone on here has more experience and can comment. Sorry I can't really help any further.