First off, I'd try restarting both the computer and the iPhone.
To restart your device, press and hold the side button, then slide the slider. Once the device has powered off, hold the side button again for a moment until you see the Apple logo.
(reference: https://support.apple.com/en-ca/HT201559)
If you've done that and are still having issues, I'd recommend making sure iTunes is up to date. On Mac, choose the Apple () menu and select App Store, then click the Updates pane. On Windows, choose Help > Check for Updates in iTunes.
(Note that iTunes after 12.6 can't sync apps to iOS devices. If don't know what this means, it's not important and you can pretend I didn't say it.)