Well the decentralized nature of the Fediverse helps spread out the cost. For example you can rent a VPS (virtual private server) for like ten or twenty dollars a month and throw a Lemmy instance on it. That's where many Lemmy instances are currently living. There's your own time involved in maintaining the instance, but the cost should remain pretty stable.
Conversely, a centralized service where all users have to be supported by an individual or company owned cluster of machines can get very expensive. I can't imagine the operating costs for a site like YouTube with the demand for data storage and bandwidth.