iPhone frequently asks "Trust this computer?" upon connection to Mac Often, when I connect my iPhone 7 to my MacBook Pro 2018 (using a new Apple Store-supplied USB cable), the iPhone prompts "Trust this computer?". I tap "Yes", and then have to enter my six digit pass code on the iPhone.

It's happening more than 50% of the time, probably 60-80% from eyeballing.

i.e. Not every time. It's not 100% repeatable.  But I've just tried disconnecting and reconnecting 10 times and 7 times I got this prompt.

This is beginning to infuriate me.  Is there any step I can take towards diagnosing?

EDIT: It is worth noting that the cable does work. I am able to transfer data between the computer and phone. So it appears the issue is not related to the cable.

EDIT: I've noticed this only occurs when I have hotspot enabled!
Most likely lint.

The lightning connector is prone to collecting dust and dirt, which can keep the phone from getting a clean signal from the cable (a faulty or not-to-spec cable can have the same effect). Take a toothpick or anything else that's thin and non-conducting and get that dust bunny out.

Never believe anyone telling you to reboot all devices and reinstall all operating systems in your house.