Make sure the write protect switch is in the unlocked position which is pushed towards the end with the terminals.
If you have a card reader or a card reader slot in your PC or laptop, plug the card into that and see if the computer will read it. If not, it is probably just a defective card and needs to be discarded. If the computer CAN read it, have the computer check it for and correct any errors. Then put it back in the camera and see if the camera recognizes it. If it does, reformat it in the camera and it should be useable, BUT . . . I am not sure I would feel comfortable trusting any of my "hard won" images to a card that had had errors on it (corrected or not). I would probably select a new card in any case. Since you have already tried another card to no avail, I suspect that you may have a defective camera.
2/07/2023: New product announcements!EOS R8 EOS R50RF-S55-210mm F5-7.1 IS STMRF24-50mm F4.5-6.3 IS STMRF15-30mm F4.5-6.3 IS STM