It sounds like the DS is crashing upon attempting to read the game card. If another game card works consistently then it may be isolated to the cartridge. If it keeps crashing with any cartridge then there may probably be internal damage.
Below is a teardown for the 3DS XL, and a guide to replace the motherboard. It looks like the card reader is attached to the motherboard so if there is a problem with it you may have to replace the whole unit.
[guide|36346]
[guide|25399]