I've seen some USB cables that have a magnetic end. You permanently insert a little adapter into the usb port on the device, and then the actual usb cable attaches magnetically to the adapter.
BOTHER: looks like these cables are mostly (if not totally) charge only
Sent from my Pixel 4a using Tapatalk