Only the first TestGameMode to load will be the one that is used. TestGameMode can do things like replace the player characters, edit the difficulty and so on. This means if you edit TGM and want to use those in the mod, that mod has to be #1 or those edits are undone. That makes it a half stacking mod, and not a safe stacker, you just have to warn people it only works in #1 slot.
If you edit the PrimalGameData “additional & remap” fields and only the “additional & remap” fields, those changes will cascade as all the mods are loaded into the server. If you edit ANYTHING but “additional & remap” fields your mod isn’t a clean stack, and will need to be #1 or anything not in “additional & remap” is ignored. But if you remap anything, like a resource and don’t make it the child of the original resource, all other mods that use the vanilla version will stop working with your mod, like a stack hack.
edit - If you want a flow chart i’ll draw one up later, just let me know.