There is an observation that if you replace a bus line with an equivalent tram / light rail line, the rail line will attract more passengers. The reasons are not fully understood. Comfort probably plays a role. Another reason might be that rail lines are easier to understand. Buses are almost universally confusing, while tracks make it obvious where the rail line goes.
Trams also have a capacity advantage, because the vehicles can be larger. And operating them is cheaper in the long term, because the vehicles are much more durable.