Retry using the original Apple cable or a certified Lightning cable.
Because the USB cable in use is broken or not compatible with your device, your computer may not be detected by the computer even though it is firmly linked. Whether you have a spare Apple USB cord, try using a different cable or a Lightning cable to see if your USB cable is working. Check to see whether the outcome is positive.
Allow your iPhone to have faith in your PC.
When you trust a computer, it has complete access to your iPhone and all of its data. So, when asked by the notification, unlock your iPhone and hit Trust. Both your iOS device and the PC have established a connection in this situation, and the computer has already established a connection but still requires a confirmation from iOS to grant permission or access. Just like other devices, your iPhone does this for security purposes.