Have you written a really amazing book yet? Because that is truly the first step! :)
Assuming you're talking about book length fiction, it's hard to write and finish a great book. Most of the other stuff is very secondary. The important thing is to write the book. (And rewrite, and edit, and polish, etc.)
I don't know much about self-publishing, but for traditional publishing, the big side hustle pro is that the author gets an advance. This is an advance on royalties, so basically a % of expected sales moneys. Other pros: you generally get an editor, a production team who takes care of things like copyediting and cover design, a marketing and publicity team, distribution into stores, etc. Even if the book doesn't sell many copies, you will have your advance. Cons: other people are in charge of your work. If it's a huge success, you'll continue to make royalties, but the publisher will also make a lot money. If you don't like the decisions your publisher makes about your book, there isn't a lot you can do about it.
There's a lot of info on the hows out there, but a quick primer: to be publisher-published, the first step is usually getting an agent. Lots of tips that you can google, and Writer's Market is generally the industry recommended book, although you can find most of what you need on the internet and I've never actually seen a copy so YMMV. If you are writing genre fiction (such as romance and sci-fi), you can submit to some publishers directly so you may not need an agent; some small houses also will read unagented submissions. Most large houses will only read agent-submitted work. An agent should never charge you fees, should only get paid if you get a deal, and she'll take 15%. The agent will submit to publishers, so you'll ideally want someone who has a proven track record of sales to major houses.
Personal experience/story: In the last 6 months or so, I have had almost 300 novels submitted to me. Out of those, I have been interested in 8. I bought four, one in a competitive situation, with advances ranging from low five figures to six figures per book for various rights. I told two authors that I was interested in working with them if they were interested in rewriting their books from scratch. One of those sold his book somewhere else as it was, so he didn't need me, and one did not sell his elsewhere, so he and I have discussed revisions. The seventh book I'm still discussing with the agent. And the last was preempted by another editor for an unholy amount of money. After I read 30 pages of that one, I sent it to my boss and colleagues and asked everyone to read immediately because I could tell it would sell really quickly, and it did. Many of the books I turned down sold somewhere else; personal taste is very subjective. Most have not sold. Great books that sell quickly for lots of money are rare.
Good luck! (And it may sound silly, but worrying about all of this too early can fracture focus and distract from the actual writing. I'd suggest trying not to get too caught up in the details of publishing (and the daydreams of bestsellerdom and glowing reviews) until you've written the book. :) )