With a huge engineering team of very smart people. YouTube has some incredible technology powering their backend. Most people seem to underestimate how much work went into it.
The key word in your question was "better." Sure, building a YouTube alternative is doable. But to make something better than YouTube (disregarding politics) would be an extremely impressive feat.