Use a USB or USB-C cable to connect the iPhone to the computer
Unlock the iPhone
Tap Trust This Computer if prompted
Enter the iPhone passcode if required
Open Finder on Mac or iTunes/Apple Devices app on Windows
Select the iPhone from the device list
Use Wi-Fi sync if previously enabled and both devices are on the same network
