sinceSince all of the homebrew data is stored on the sdSD or micro sdSD just backup your leftover 3ds3DS software (internal and cartridge software).
Link your nintendo idNintendo ID via nintendo 3dsNintendo 3DS data transfer in 3ds3DS systemoptions.
Then put the sdSD or micro sdSD on your pc and make a backup.
Homebrew/jailbreak the new console via " https://3ds.hacks.guide/key-information ".
Then after finalising the homebrew, transfer the savedata from /3ds/ (stores homebrew data) and from /nintendo 3ds/ (stores normal 3ds3DS data) to your sdSD or micro sdSD and reinsert it into your new console.