it depends on the game afaik, early games didn't have many. like for instance ocarina of time 3d only has 2 different header variants, it's why you could flash oot3dhax using powersaves. save data is encrypted with cartridge header, because ocarina of time only had two different possible headers then someone with homebrew could install the hax, dump the save with powersaves, and other people can restore it to their cartridge because the header matches
on newer games you couldn't share powersave backups, because each backup was encrypted using the cartridge-unique header, and unless you had the same header (which you wouldn't), the console cant do anything with it
https://wiki.gbatemp.net/wiki/Gateway_3DS_Installation_and_Usage#Enabling_Online_in_3DS_Games
it's not completely clear if they ever actually banned anyone for using shared headers though