If applying Windows updates didn't solve your problem, drivers might be the underlying cause of your issue. You can then download a fresh copy of iTunes from the Windows Store.
Go to Settings > Apps > Apps & features and uninstall everything related to iTunes, iCloud, and Bonjour. If you're on Windows, you should also try reinstalling iTunes if updates don't make a difference. If you downloaded iTunes from the Microsoft Store, you'll have to open the Store app to check for iTunes updates. To update iTunes on your Windows PC, open the iTunes app and go to Help > Check for Updates.
For earlier versions of macOS, open the App Store and go to the Updates section to check for new iTunes updates. Head to System Preferences > Software Update to check for and install the latest updates. On macOS Mojave, iTunes comes bundled with macOS software updates.
You should thus update iTunes to eliminate bugs and software incompatibility. It's possible that the version of iOS on your device isn't supported by the iTunes version you have installed. Once you've ruled out cable and USB port issues, your issue may lie with the iTunes software.