Where does things come from that didn’t exist before?
The short answer is someone dreamed it up.
They set down, and had some kind of stroke of genius; and put it down on paper.
They worked out some of the bugs on paper, then implement the plan. A plan that worked out more bugs by failing.
They went back to paper again, and dreamed up more ideas. Ideas that willed something into existence.
It’s a beautiful and intellectual thing.
The ideas don’t always work, but for me the process is more fun then the downside of failure.