The beginning is nearly always federal R&D funding. Much of it won't work, sure, and that's fine. It's not wasted, because when it works, it creates such a massive everlasting surplus and opportunity machine that it overcomes all past failures by orders of magnitude. Such as, computers, and all they enabled over the last 100-ish years.
The myth of the lone inventor in the garage should have been updated even in the pre-WW2 era.