Trams are fairly useless and really offer no advantage over a bus but have lots of disadvantages (set routes, high infrastructure costs, taking up lots more space, difficulty goin around a corner) and were only an advantage over a crude early bus or horse drawn carrage.
I think trams have their place, and do have some advantages over buses.
- Easier to automate
- No emissions
- Quieter
- Better capacity and throughput
- Overall operating costs are, I seem to recall, lower than buses
There are of course disadvantages too, but I don't think it's true to say they offer no advantage.
Different situations call for different types of public transport.