Your iPhone should be unlocked and switched ON.The latest version of iTunes needs to be installed on the system.
Install iPhone Drivers on Windows 11/10
If the drivers still don’t install automatically, you could install them manually as follows:
1] In case you installed iTunes from the Microsoft Store
Unplug your iPhone/iPad from the system. Make sure your device is unlocked and re-plug it to the system. In case it trigger-opens the iTunes application, close it. Press Win + R to open the Run window and type the command devmgmt.msc. Press Enter to open the Device Manager. The Apple iPhone drivers would either be under the Portable Devices section or the unspecified section.
Right-click on the iPhone drivers and select Update driver. Restart the system and check if the Apple device has started working.
2] In case you installed iTunes from Apple’s website
Unplug the device, unlock and replug it. If it opens the iTunes software, close the same. Press Win + R to open the Run window. Type the following command in the window and press Enter to execute it: This would open the drivers’ folder for your Apple iPhone/iPad. Locate either of the two files in that folder: usbaapl64.inf or usbaapl.inf. Right-click and select Install for these files. Select the .inf files/files only, not others with the same name usbaapl64 or usbaapl. Read: iPhone not charging when connected to computer.
iPhone Driver not showing up or detected on PC
Open the Device Manager as explained earlier and expand the list for Universal Serial Bus Controllers. Search for the Apple Mobile Device USB Driver in the list. If you do not find the option, please change the connecting cable for your Apple device, or try plugging it in a different USB port. If you find that option with an error symbol (like a yellow exclamation mark), try restarting the Apple Mobile Device Service. Open the Service Manager and locate the Apple Mobile Device Service. Right-click on the service and select Restart service. Restart the system and it should possibly resolve your problem. Hope this works for you!