I think this is the kind of advice that sounds great but is followed by successful businesses much less frequently than it might seem.
I've collected 51 stories of solo-founder, profitable businesses (https://blog.kowalczyk.info/article/wjRD/solo-founders-with-profitable-businesses-collected-stories.html).
If you analyze their stories, I don't think there's a single one that followed "talked to random business owners" path.
Some people just do a small thing for themselves, make it available and it becomes successful.
Some people are guided by work they do for clients ("if one client paid me to implement X then maybe I can turn X into a product").
But the reality of software business is that it's speculative. You come up with something, you implement it and it either works out or doesn't.
It's risky but the search process isn't completely blind. There are clues that something is desirable.
For example, one of my ideas is to write a GUI version (for Mac or Windows) of https://github.com/jonas/tig. The clue there is that:
- the project has 4559 stars, so people seem to be interested
- there are other GUI git clients that are making money on Windows and Mac
So it stands to reason that if I did a unique GUI client that more-or-less replicates tig, people would be interested.
You can scour github for other things that exist, are popular but could be improved upon (here the improvement would be console => GUI) or where you could create a unique twist on similar idea.
You can also look for clues on forums or stack overflow: if people ask how to do X and there isn't software to help doing X, then it's a clue.
Many clues are obvious in hindsight and fall into "lots of people doing X and preferably making money with it".
For example, some people made really good money writing software to automate eBay listings. It's too late for that particular business but it was pretty clear that eBay was blowing up and people who sell many items would benefit from software to make their life easier, more efficient. You just needed to have presence of mind to connect the things you know are happening in the world and notice there's a way to insert software there.
Similarly, git was clearly blowing up, people like GUI clients for source control so it was a no-brainer (few years back) to write a GUI client. Some people did.
So what is blowing up now?
Everything related to cloud (AWS, Google Cloud, Azure). Make tools that make some aspects of dealing with them easier.
Flutter will be big. If you're in educational business, that would be a good project to do a book or course.
Same with webassembly.