I don't think there's one simple, straight-forward, cookie-cutter answer to this. There are a lot of different ways you could approach this, depending on ... stuff.

But to start... I would say you should begin not by thinking in terms of identifying a problem, but by thinking in terms of identifying a candidate problem. That is, some hypothesis that you can then turn around and try to validate. (I won't get all Popperian here and point out that you can really only invalidate hypotheses, but instead will just lean on our intuitive notion of what it means to validate a hypotheses).

Once you have a candidate hypotheses (or two, or three, whatever) there is a somewhat straight-forward process for how to validate it and (potentially) turn it into a business. That process is laid out and explained in The Four Steps to the Epiphany and The Startup Owner's Manual.

Anyway, back to our "candidate hypotheses". The most obvious way to generate one is from personal experience. Eg, if you have worked as, say, a surgeon, you will probably already know a lot about what problems surgeons face.

OTOH, if you think you want to sell to a certain domain, but you don't have actual experience in that domain, you could make it a point to cultivate personal relationships with people who are in that domain, as well as doing a deep-drive into "the literature" of that domain, taking classes, watching videos, etc. But at the end of the day, if you're going to try to build a business selling something to, say, fire departments, you're probably better off having been a firefighter.

It might be a tough nut to crack, and the logistics might be tricky, but you may be able to find a way to embed yourself in the domain you're interested in. Volunteering, or just asking to "shadow" somebody for a period of time (this is where those pre-existing personal relationships come into play).

Another angle is "problems that are so general that they always exist." There's a famous phrase, the exact words of which I forget, which summarizes this nicely... it's something like "people will always want to pay less for things, have more free time, be healthier, have more sex, etc." So if you can come up with something that addresses any of these highly general topics, you might have a good candidate. Alan Kay, in one of his videos[3][4] talks about referencing Donald Brown's book Human Universals[5] as a source for thoughts on these "universal" themes. There's a LOT of good stuff in those two videos, so if you haven't seen them yet, I'd highly advice watching them.

Another thought is to find places where people like to complain, and listen to their complaints. Find any forums, sub-reddits, or sites named something like "XYZSucks" and pay attention to what people are complaining about. Maybe you can build the replacement for XYZ that doesn't suck, or at least a complement / accessory for XYZ that mitigates some specific instance of suckage.

I'm sure there are a hundred other ways to approach this, so be creative.

[1]: https://www.amazon.com/Four-Steps-Epiphany-Steve-Blank/dp/09...

[2]: https://www.amazon.com/Startup-Owners-Manual-Step-Step/dp/09...

[3]: https://www.youtube.com/watch?v=id1WShzzMCQ

[4]: https://www.youtube.com/watch?v=1e8VZlPBx_0

[5]: https://en.wikipedia.org/wiki/Human_Universals