If the card works in another device without issues, most likely your card reader is faulty (hardware related), and the only way to fix that would be to get the phone repaired.
You can try booting into Safe Mode and see if that helps, but if you already did a factory reset, it's looking more like a hardware issue since it seems you've tried different cards. But again, even with multiple cards, make sure the card doesn't fail in another device.