The publishing world argues about this question with religious intensity, which helps authors very little. The truthful answer is conditional: each path rewards different books, different goals and different authors, and the right choice emerges from your specific situation rather than anyone's ideology.
What traditional publishing offers
A traditional deal brings professional editing, design, distribution into bookstores, an advance against royalties, and the credibility that certain readers, media and institutions still reserve for established houses. The costs are time and control: agent search plus submission plus production commonly runs 18 months to 3 years, royalty percentages are modest, and decisions about cover, title and timing belong largely to the publisher.
What self-publishing offers
The independent path offers speed, complete creative control, and royalty rates several times higher per copy. The trade is that you become the publisher: editing, cover, formatting, metadata and marketing are your responsibility and your budget. Done professionally, an independent book competes with anything on the shelf. Done cheaply, it looks it.
How to actually decide
Ask three questions honestly. First, what does this book need to achieve: prestige and bookstore presence favour traditional, speed and income per copy favour independent. Second, does your genre support your choice, since some categories thrive independently while others still move through houses. Third, what do your platform and patience honestly look like today.
The hybrid path
Many authors pursue both simultaneously. A self-published backlist funds the time a traditional submission campaign requires. A traditionally published author uses independent titles to reach readers between contracted books. The paths are not mutually exclusive, and a publishing strategy session can map the sequence that serves your specific situation.