Unfortunately, as you are learning, this is 100% backwards. Writing something that is commercially successful starts by identifying a potentially commercial product.
In other words, you need to start by Marketing, not programming. You're looking for 3 things;
A market you can reach; That have money to spend; That are prepared to spend money to make some pain go away.
It might be obvious that a market might exist (say something that makes govt more effective) but selling to govt requires enormous resources you don't have.
It might be obvious a market exists (a tool for refugees to apply for aid) but they have no money to buy anything from you.
It might be obvious a market exists (trips to the moon) but you can't build that.
Once you have found a market you can reach, who have some money, and are willing to spend (perhaps with a deposit) then (and only then) should you start coding.
Commercializing stuff you have already made is hard because the product was tailored to a specific user, and he already has it (aka you).