Writers have so many options now-a-days.
There is traditional publishing with a New York publisher where you come out in print, e-book and maybe even a book club.
There is small press publishing where you come out in e-book and print, sometimes e-book only.
Then there is self-publishing where you do everything yourself. Usually come out in e-book and POD (Print-On-Demand)
And then there is the hybrid author who does both traditional and self-publishing or small press and self-publishing.
There is no right or wrong here. Each writer must explore what is best for them.
But you need to research your choices. I hear disparaging comments on all sides of the coin where one side doesn't think the other is very smart.
Talk with other writers, find out why they choose the path they did. Learn about the business and educate yourself.
No one is going to educate you. You have to seek out the answers.
Professional writers organizations like Romance Writers of America, Mystery Writers of America, etc. are a good place to start. Many of them have some basic education, but again it is up to you as the writer to make the right decision for you after you have done your research.
Also understand there are things a New York Publishing house might do that a small press may not. Or a small press may do something better than a New York Publisher. All have their ups and downs.
The only warning I give, is if you decide to go the self-publishing route, remember you have to do it all. Writing, editing, proofing, copy editing, cover art, formatting, putting it up on every platform, etc. If you're unsure of anything, hire someone. I would particularly say hire for editing, copy editing and cover art.
You want to stand out in a sea of thousands, in a good way, make your book the best possible book it can be before you or your publisher puts it out there.