please try this options , I used to have this problem but mine wasn’t charging at all.
# '''Update''' '''iTunes'''. Generally, iPhone owners use iTunes to connect to their computers, regardless of whether they're running a Mac or a Windows PC. As such, it's always a good idea to ensure that you're on the latest version of iTunes, since the problem could stem from some kind of bug the latest version fixes.
# Update your '''operating software'''. If you've done all of the above, including updating iTunes, your next port of call should be to trying updating your OS (if an update is available). We delve into this for both macOS and Windows.
# '''Update your''' '''Driver Software'''. This step applies only to Windows users, and it involves updating the software that handles how your computer connects with your iPhone.
# In most cases, you would have downloaded iTunes from the Microsoft Store, which means that you need to follow the steps below:
## Unlock your '''iPhone''' and open the Home screen, then '''connect''' it via USB cable to your PC (close iTunes if it opens upon connecting).
## Click '''Start.'''
## Click '''Device Manager.'''
## Scroll down and click the '''Portable Devices''' tab (note: this may be called "Imaging Devices" or "Other Devices", depending on your version of Windows).
## Right-click the driver option that represents your '''iPhone'''. This may be written as "Apple iPhone" or "Apple Mobile Device", or "Apple Mobile Device USB Driver".
## Click '''Update driver.'''
## Click '''"Search automatically for updated driver software".'''
# After updating, you should disconnect your iPhone and then reconnect. Hopefully, your PC will recognize it.
# But if you happen to have downloaded iTunes from Apple (i.e. from Apple's website), you will need to take a slightly different route in updating your drivers, as described below:
## Unlock your '''iPhone''' and open the Home screen, then '''connect''' it via USB cable to your PC (close iTunes if it opens upon connecting).
## Press the '''Windows + R''' keys simultaneously, in order to open the Run command box.
## Type: '''%ProgramFiles%\Common Files\Apple\Mobile Device Support\Drivers.'''
## Click '''OK.'''
## Right-click on the '''usbaapl64.inf''' file (may be listed as "usbaapl.inf" instead).
## Click '''Install.'''
# After installing, you should disconnected your iPhone, restart your PC, and then connect your iPhone again.
# Consider restoring your iPhone to its '''factory settings'''. If your iPhone still won't connect to your computer after having tried all of the above, you should consider performing a factory reset. This is a pretty drastic option, but it does sometimes work. This will wipe all the data from your device, so do consider it as a last option.
# '''GOODLUCK;'''