I sadly don't see how that could really work in a modern city because cargo trams can't just stand still on the track in order to unload because passenger trams can't go past them.
You'd have to build out additional rails for cargo stops everywhere.
Commonly used delivery vehicles (sprinters etc.) are quite dense w.r.t. cargo/m^2; they don't have the incredible density inefficiency problem of personal motor vehicles. They can also flexibly be temporarily parked on nearly every street in a way that at worst usually only partially blocks traffic and therefore don't really require special infrastructure.
Cargo trams would likely take more space for ...what upsides exactly? No seriously, what are the upsides?
For long distance cargo, trains' efficiency boons are obvious; long loading/unloading times are offset by the immense efficiency and speed.
For urban cargo transport with its short distances, non-standard routes and sometimes very frequent stops, I fail to see how trams would be a good fit.
You don't even need that. A decently high-end CPU will also work, just a good bit slower of course.