There are multiple file recovery methods you can try, but if you want to have any chance and hope to get the files back, you should absolutely NOT write any new files or make changes to the existing files, as that can overwrite the parts of the card where your files were stored, which are now marked as free space since you deleted those files. Might as well just use the write protect switch on the SD card while trying to recover files from it. Unfortunately you might already be past that point, since allowing the 3DS to boot up to the home menu with that SD card would already create some new files, and placing even a single new file on the card could destroy some of the deleted data.
Even then there's unfortunately not much guarantee that you can correctly recover all your save files, since the "Nintendo 3DS" folder is made up of a lot of files in specific folders that all usually have cryptic names, and even if you haven't written a single byte to the card after deleting those files, there's really no guarantee that file recovery programs will be able to recover those files with their original names and paths. I'm not an expert with this, but maybe if you somehow manage to recover just the specific files which were the game save files, you might be able to decrypt them by dumping the encryption keys from your 2DS using homebrew, and then import them using a homebrew save manager like Checkpoint.
I don't know what games you play, but I think this would only make sense for games where the save files store a lot of information and matter a lot like for example Animal Crossing, or some game where you have created a lot of custom levels/content. Otherwise I wouldn't bother if it's games where the save files just store things like your progress and unlocked items, you might even be able to "restore" your save files for those by using commonly available save editors to edit in the progress and things you previously had.
Any of this might also not be easily possible at all, but I'd strongly recommend write-locking the card and not changing anything on it until you get some more advice or recommendations for other recovery programs here, as writing or changing any file on the card in this state lowers your chances of recovering anything.