There's nothing wrong with recruiters. They are there to help you find a job. Companies have in-house recruiters, and recruiting agencies get paid by the company that hires you (at least in the US). They're basically a free service for you -- you should take advantage! Most of my best jobs I've gotten have come because I have a great relationship with a few recruiting firms that specialize in the area that I work in.
I don't want to put words in your mouth, but what I think you might be experiencing internally is the recognition that recruiters aren't necessarily your BEST advocates. They advocate for you, but there are plenty of fish in the sea, after all, so if you won't get the job, they'll move on to someone else.
As a hiring manager, the best signal is a referral from someone else in the company. Depending on the strength of the referral, it could be practically a guaranteed outcome. My best hires have come through referrals.
So how do you get referrals? Build relationships with your peers! Talk to friends that work at other companies, go to tech conferences, join a local meetup in your area of interest. Build genuine relationships -- not just superficial "help me find a job" relationships -- and you'll be rewarded on a personal level, if not a professional one. I got my start in the industry because a friend of mine vouched for me.
The advice to "avoid recruiters" is misguided at best, but I understand why folks don't like them. But I'd find a recruiting firm that specializes in your area, whether that's backend or frontend or contracting or leadership or AI or database systems, and be really open to having them help you find the best positions. They are far, far more connected than you are -- and a recruiting agency wants to get you the most money possible!
How do you find these recruiting agencies? Well, ask around to people you know. Ask hiring managers in the field that you're interested in. Check LinkedIn often. Search for recruiting agencies on Google or Bing.
Good luck!