Have you allowed some programs to automatically open and run every time you log into your iMac? From your description, it seems that certain items stop your SD card from being recognized and mounted by your iMac.
You can go to the Apple menu > System Preferences > Users & Groups > Login Items for a checking. If any items are listed there, select them and then click the remove button (-) and enter your admin password on the prompt to remove them. That is how to stop these programs from working at the Mac startup.
If your SD card is still not recognized and not showing up on your Mac, try to:
- Reset NVRAM on your Mac. NVRAM resetting can fix some Mac hardware's improper actions.
- Go to Disk Utility to manually mount the SD card.
If your SD card still can't be mounted on your iMac but shows in Disk Utility, the last way is to try using a data recovery tool like iBoysoft Data Recovery for Mac to get files off it first and then reformat it.
If your SD card not showing up in Disk Utility, check the connections, SD card slot, and SD card itself.