Cargo ships consume fuel and, in my opinion, they need too micromanagement to collect minerals around. In the game, a mass driver doesn't use anything to operate.
Again in my opinion, cargos are better used to move installations (or goods between different systems): e.g., you need cargo(s) to transport a mass driver to the body where you mine minerals (if you cannot build it there).
The game anyway allows you to use cargos as you want.
A mass driver (
https://en.wikipedia.org/wiki/Mass_driver) is made of several electromagnets, mounted in a row, that are activated progressively to accelerate a projectile made of iron (or any material able to respond to the magnetic field), to launch it at very high speed. The projectile can be a container filled with everything you want.
A Gauss cannon is the military version of a mass driver.