I would like to point out that Citra adds two zeros to the game ID, which apparently should not be in the name of the text file.
I play Pokemon Sun, so I made the file 00040000001648.txt in the cheats folder. But if I fire up Citra and load PokeSun, it says the game ID is 0004000000164800. I’m guessing those additional zeros are there in case you want to have several cheats in different files, from 00 to 99.
I know it works because when playing Sun I get the “selected pokemon from selected level appears in the grass” cheat, and I need only to press the Select key while walking in the grass to make that pokemon appear.
Incidentally, the example in the page where I got the cheat is misleading: it says to put 150 to get mewtwo, but if you do, you will get Seviper, which is 336, or hexadecimal 150. To get Mewtwo you have to type 096, which corresponds to decimal 150.
EDIT: I made an experiment, as I was curious. I copied the file with the cheat adding the two zeros at the end, and now the game ignores my original file and looks only for changes made to 0004000000164800.txt. Curioser and curioser.