My phone suddenly shows an SD-card notification
One of my family members had the same problem, SD card misbehaving, then working for a few days, on and off. After a week or so the phone did not read the card at all and neither did the PC. Fortunately I backed up the content of the card after the first problem. The card worked for about a month after formatting, but died eventually.

I do not know what causes this.
I do not know how to stop it.
I know what you should do: a backup.