Try restarting the phone (just turn it completely off, wait a few minutes and then turn it back on). This may resolve the problem.
If it doesn't, then it could be an app on the phone, a virus or malware that is causing it not to recognize the SD card. You should check the device for that. You may also want to try starting up the device in "Safe Mode" and see if the card is recognized in that. If it is, then definitely check for things on the device that shouldn't be.
You should also check that there is nothing in the slot where the card goes. Dust, debris, crumbs, etc. and that nothing in there is bent. Then check the card itself for scratches, damage, etc.
Side Note: While cards are able to be taken in and out of a device, and put...