I started off in the same position 10 years ago, I think what helped me the most was eventually finding a niche, and focusing on one type of client or problem (as “programming” is way too broad, that and getting initial referrals from friends and family members.
I feel like a gross sales guy linking to my blog, but I am in the process of fully documenting my journey from developer, to building, running, and ultimately selling my software agency - so there may be a few articles that are beneficial for you at https://www.devtoagency.com , specifically https://www.devtoagency.com/think-niche/ and https://www.devtoagency.com/referrals-from-friends-and-famil...
Good luck!
Before covid you would move somewhere where the market is good for engineers, kick it off with some CTOs sending your A-team of the best contractors ever. It's basically like getting a normal job but you're not selling yourself but a team of people.
Finding companies at the right stage or CTOs that get hired to transform companies is crucial.
Over time you can slowly disinvest from the company and start sending cheaper contractors and retire.
Maybe this is what the OP meant.
The situation is a little more complicated if one wants to sell services to an end client that is not technical. Finding the right marketing mix to get in front of these clients is a challenge (ie, they are not on HN and many of them spend very little time online for work-related activities).
I keep hearing that going after a relatively narrow niche where you can offer relevant expertise is the way to go. Even then, I suppose some sort of direct outreach is the way to go.
Why not spend 80% of your time networking? Nobody respects people who do that. They do want people who can get the job done, so you still have to be spending most of your time getting the work done and becoming an expert.