Important: don’t try to use your SD card any more after losing the data, otherwise the data will be overwritten and unrecoverable.
You’d better develop a good habit of backing up all your messages. You can complete it simply with the software Message Backup. It can greatly reduce the possibility of losing messages in your daily life. And the action of backing up seems to be much easier than restoring.