Just buy a magnetic usb-c cable if it’s very important to you

The USB-C standard doesn't allow for a magnetic attachment. Besides, those are notoriously unsafe and probably even dangerous to use.