Recuva

Yes Recuva can handle SD cards, and can revover the directory structure (if possible).

SD cards are treated just like any other drive, restoring the directory structure is one of the Advanced options.

See the video that is attached to the bottom of the following linked post.
In it the guy deliberately formats an SD card to lose all the files on it and then uses Recuva to get them back.
That is a specialist use case of an accidentally reformatted drive though, so you should watch the whole video for a decent “how to” on using Recuva: