This command solved my problem. However, I would suggest that for those with little knowledge of Mac, please do the following steps:
1- Go to Application
2- Go to utilities
3- Go to Terminal
4- copy and paste this command in full : sudo killall -STOP -c usbd
5- press Enter
6- It will prompt you for your password, and type your password and hit enter
7- connect your iPhone to mac
8- The problem should be resolved
Best of luck