I published a book in November. It's selling. Slowly. I'm not expecting it to be profitable for several years (I've self-published, and so I've had some costs such as a cover design, editing and proofreading). I'm ok with that - I'm writing a series, and everyone I talk to suggests sales for self-published series rarely do much until at least the third volume, and it's a hobby for the most part. It's only worth it for me because I write fast and it relaxes me. Even then, it's only worthwhile because I expect sales to keep dripping in for many years (and that was a key motivation for writing a series, as well).

What I've learned as well is that most self-published writers have not the fainted clue what publishers do to sell books and/or actively do not want to do what publishers do to sell books. E.g. the traditional sales process for a paperback starts 6 months plus before publishing, and involves calling up distributors and retailers, and sending out review copies for months. It takes an upfront investment and time, and that too will only work if people believe your book will sell for them - if you don't have a big-name publisher behind you who can promise a marketing campaign, you're back to needing to have an audience (or a very compelling story).

Most self-published authors don't even know how to ensure they get reviews. It took me ages too, before I found someone to spend time reaching out to potential reviewers (it's a minefield; so many scammers - I was extremely cautious)

Advertising is a total minefield - most ads, including Amazon ads where the purchasing intent is a lot stronger, take ages of tweaking to get a positive ROI, and even then you need an audience to get decent returns, because getting people to buy based on an ad if they've never heard of you is hard.

After all that, you can still expect it to take years to get traction.

Charlie Stross commented on Twitter recently that it took him at least a decade (it might have been longer; maybe 15 years?) before he surpassed 5k pounds a year from his writing. That was with a publisher. Of course he's writing relatively niche sci fi. If you go for an easier market, like romance or thrillers, you may have a better shot (maybe; the competition is tougher too). But even professional authors who eventually make a good living off their writing often take a long time to get there.

One of the things a publisher gives you, that many who choose to self-publish don't want, though, is an objective third party assessing if you've written something that they think is likely to sell. Of course they can be wrong, and frequently are. But they're investors, effectively, considering whether it would responsible for them to put their resources and time at risk to back a book or an author. They're selective because frankly most authors are not very good, and many one the ones that are good or even amazing are unlikely to sell or unlikely to sell to their audience.

When self-publishing you get to ignore that and pretend you're the best ever. Or you can be more realistic, and expect that you most likely won't sell much, but of the people who buy, some portion will be looking forward to your next book. And so unless you're truly awful, sales will at least slowly grow.

But odds are you won't make all that much. You might write far better than JK Rowling and still not sell very much because you write something that just doesn't catch the imagination of book buyers.

But if you're at least aware that being a self-published author means at least half your time will be sales and marketing rather than writing, you'll likely already do better than most self-published authors.