The most common reason is that you did not format the card with the camera before using it to take pictures.

Another is, you switched the card between two different cameras without formatting the card with the camera before using it to take pictures.

Another is, you used the card in a card reader on your computer and wrote something to the card with the computer.

.................

To make the card work in your camera again, is probably your present problem.

This usually works:

Connect a card reader to your computer.
Insert the card in the card reader and save all of the photos on the card to your computer.
Then delete every file and folder (on the card) you find.
Then take the card and put it in the camera.
Format the card with the CAMERA.
You should be able to take pictures on that card now.

..