That’s like saying a ship is more expensive than a car. It depends.
A tram is not „infinitely“ (what absurd statement is that anyway) more expensive than a bus.
Construction cost is not everything, and they’re not even that much higher, you’ve also need to consider service life (much longer with trains), energy cost per passenger mile (much lower with trains thanks to the lower resistance), etc.
What is best is always depending on the specific circumstances.
The biggest limitation of buses is capacity, and a highly used tram is cheaper per passenger mile than a bus. Try replacing the S-Bahn in Berlin with BRT, see how far that gets you. You’d probably need to bulldoze a new highway… speaking of which:
Germany, is actually hellbent on building a highway right through its capital Berlin, which currently clocks in at 700 milion € for 3.2 km. I expect the whole thing to end at ~2 bn € for ~7 km.
So I think the costs of public transport are really not the issue people should be focusing on.