"Mac stopped detecting external devices: At the beginning my mac detected all the external devices like USB camera. I plugged in my smartphone to transfer photos. After unplugging the phone mac detects neither the camera nor the phone. I browsed the internet in search for a solution but failed. I also tried turning mac off and on again as well as unplugging the camera but it failed as well."
-------
Troubleshooting External Hardware Connectivity:
Try the Following:
(Applies to Intel-Based Macs Only)
Reset the SMC and then NVRAM once more, but this time in Safe Mode. Sometimes when changes are made to the system(updates), system configurations (i.e. for Ports) become manipulated, technically. So, reset the SMC and NVRAM. It might take up to 3 attempts to reset each.
Contact an External Keyboard, and see if that works. Note: For a much newer Mac, you may need one of these adapters: USB-C to USB Adapter - Apple.
What happens when you create a new user? Does it work? If so, it is probably something misconfigured in you current user.
Once connected, boot in to Safe Mode. In Safe Mode, login items do not open at log in, certain preferences are set aside, and damages system files are intentionally reset.