The issue that a phone stopped detecting an SD card is common yet definitely annoying. You can check the connection to solve this problem.
Please check the connection of your SD card and phone one more time. Trying another SD card adapter or reader to connect the memory device and your phone is workable.
Alternatively, insert your SD card into a PC to test if it can be detected. If it can, then it's your phone driver's fault. You should update the phone driver instantly:
Step 1: Connect your phone to your PC.
Step 2: Go to Control Panel > System > Device Manager.
Step 3: Locate and expand Portable Devices or Other Devices, depending on which one you see.
Step 4: Right-click the name of the device you connected, and then select Update Driver Software.
With these fixes, if your SD card can be detected, then your problem is resolved.
If the PC fails to detect your SD card, I bet your SD card is corrupted. You need to utilize a new SD card for your later storage work.