YouTube also loses money or at least did the last time I checked, the cost of running it is massive but the amount of data being recorded keeps Google wanting to figure out a way to monetize it.
https://www.wsj.com/articles/viewers-dont-add-up-to-profit-for-youtube-1424897967
I think they are finally making money after a decade mostly due to all the data they collect and use for advertising, etc on their other platforms. It helps get advertisers a targeted audience.
Someone youtubes best cell phone 2021 then they start showing advertisements to that person for cell phones on any platform google ads show up.
Without a massive advertising platform like Google has it would be hard to profit off YouTube, the bandwidth and data storage requirements are absolutely insane.