Same issue here with error 4000 - latest iTunes version, whether iTunes
from Apple or through the Windows Store - iPhone 11 Pro Max and iPad 6th
Gen. This has been happening for the past few update cycles. I believe
the problem lies in iTunes thinking the phone/iPad is locked, even if
you keep the screen on and enter your unlock code when asked. The only
way I have found to update using iTunes is to turn Passcode off in
settings, then it will update. Only thing is it will delete and
debit/credit cards in Wallet and you have to re-enter them. Apple really
needs to fix this.