Mining the asteroid belt and establishing factories in space as well as collecting endless solar energy would pay for this.
All of this has been written about for many years. The papers are out there.
As with anything new, development costs can be brutal. It would take many hundreds of billions of dollars up front before there would be any revenue from asteroid mining and the like.