I will disagree with the advice you received.
The vast majority of self-published fiction earns nothing, or at best some friend and family sympathy purchases. The case is even worse for un-marketed self-published fiction.
To self-publish, you are responsible for developing the marketing materials and artwork, for figuring out where to post ads, for paying for ads, for figuring out how to produce and distribute your work, for making yourself a website that takes payments, and even many people that have accomplished all of that still languish in the single-digit sales per month, and many spend more selling their work than they earn from selling it. It becomes a maintenance nightmare, and the most likely result is you are running a failing business instead of writing.
Agents are free, publishers are free. Going the traditional route costs you nothing but time. It is very true that your chances here are also very low, BUT it doesn't have to cost you a dime, not even postage anymore, all it costs is time learning to write a query, synopsis, and where to find agents. You might get some feedback, and you shouldn't be "twiddling your thumbs" on anything but the space bar, you can be writing while you wait and trying to improve your craft.
If you don't find representation, self-publishing is an option in your back pocket. But if you get professionally published in some venue, you have partners that are professionals and will pitch in time and money in getting your work out there. The business end IS their business (both the agent and publisher), and that frees you up to write, which I presume you enjoy.
Try to go the traditional route first. Self-publishing is for the ego-trip.
If you get published you will get an advance, and if you sell more than 3000 copies you will be considered a success by the agent and publisher and they will want to publish your next (equally good) novel, because now you have name recognition amongst a small group, which they hope to grow. And unlike yourself, they are professionals with centuries of experience, collectively, at marketing books and growing an author's audience.