The best advice I got was to focus on the topic way more than on the actual content. Great quality content about a topic that is super niche won't make much revenue compared to an average book that reaches a wide market.
That's not to say that you should write average books. It's more that people usually underestimate the amount of time it takes to come up with a good idea. And then they keep investing time into a bad idea due to sunk cost fallacy.