I usually use nxmtp to conect my switch via usb or the pkhex plug in to conect via wifi.
About upadting firmware, dont update anything immediatly. First wait for atmosphere to update, copy/paste the files on the SD and latter update the ofw
I just used auto-legallity plugin for pkhex, writte the name on pkhex (or any other place), then control + i on pkhex and the plugin will create a legal maushold family of 3 or a legal dudunsparce of 3 segments
Most probably you added something you shouldnt, there is a plugin for pkhex called auto legality plugin, wich can be used to conect to the switch via wifi and give you pokemona in real time
Just reach the first poke portal and you are set.
Send 1 pokemon from legal to moded, save it on pc as .pk9
Make a trainers folder on pkhex folder and paste the .pk9 file there and you can use auto legallity plug in.
Or copy/paste your ot/sid/tid when making pokes to trade.
Most probably you added something that you shouldnt.
Dump all your pokes from the corrupt save to a folder.
Start a new game and reach the point where you can see your boxes. Make a jksv save (and keep a backup)
Load only the pokemons on the new save and check if it works. If not some pokemons will be messing with your save