There are multiple options which depend on how your system looks like.
In general, the shield of a cable is not generally intended for any other purpose than shielding, so it generally is not used as a ground conductor between two devices.
For example, if you have two fully isolated pieces of battery operated equipment, with both having metal chassis, then the shield may be connected to chassis on both ends of the cable and then it can be seen as an extension of the chassis and the two devices operate inside this metal bubble. As the metal case may not be bonded to system ground on the devices, there needs to be a common ground wire between devices where signal ground currents may flow, so that the return currents do not flow in the cable shield.
The scenario will be different if the two devices have e.g power supplies with mains inlet or other interfaces that connects the metal case or system ground to mains earth (e.g. USB to earthed desktop PC). To avoid ground loop currents from flowing in the cable shield, it is best to connect the shield only on one end. Even if the devices now get ground reference between them through other connections, it might be that in some cases they don't (one desktop PC replaced with battery operated laptop), the common ground return wire must still be between equipment. But at least the shield can't carry current, and it may be best to have direct shield connection on one device and to break the DC ground loop and allow AC signal return currents, the other device can capacitively couple the chassis to shield.