An alternative though is to jump on a hype train and pray that the momentum will pick you up.
This is why making something you genuinely enjoy can be the best approach. Because the reward you get is the satisfaction of having done it and the money you make plays a much smaller role.
Some of the most successful people I know had the initial reaction of "oh this is getting too much attention I should stop" when their things initially became popular before leaning into the interest and making businesses out of them.
There's a reason common start up advice is "solve a problem that you have."
Now I think the best question to ask before building anything online is: "can I sell this to people?" If the answer is no or maybe, then consider it a hobby.
Unfortunately sales is not solved by building things I love.
Of course you'll be successful if you spend years marketing yourself and learning all the tricks of the trade. What most engineers want, though, is to do well online while spending most hours on interesting software projects and putting in a minimal marketing effort. I'm happy for the guy, but I'm pretty sure most people here wouldn't be happy if we had to do his job.