Permanently Deleted
Do you have access to a computer with an sd card reader? I believe the best and safest thing to do is to connect it to a computer, create disk image from it and try ro use a data recovery tool in the image file.
Edit: if you only have the phone, maybe you could try looking for apps to copy a disk image from the sd card and to recover data or try using some terminal emulator or one of those apps that install a linux distro inside android to use the dd command and then use testdisk and photorec tools. I recommend the second option, because the tools are open sourc and well tested
Definitely this. The data is not likely gone, but before doing anything that could make things worse, try and get a full copy of the SD card somewhere. From there you may safely try repairing the partition or data carving tools.