By far the best way to operate is via in-network connections you already have. This could be former employers who were happy with your work as an employee, former colleagues at those jobs, people you know from your local university or tech community, even niche Discords / Slacks / forums, and so on: places where you are a known quantity and not a commodity, places where you are not competing with a million anonymous consultants on the Internet.
If you are on Upwork or some similar site, you are in a brutal Hunger Games deathmatch with many, many highly experienced people around the world, all racing to the bottom to be commodity service providers at the lowest possible cost. Avoid that if at all possible.
Devote specific time towards keeping your old connections alive, revitalize that network periodically in accordance with your local business customs and norms (the exact things you have to do to do this vary significantly by region.) That network is highly valuable to you as a consultant. That is the one place in the world where you are not merely a commodity.
Take time too to expand your network: attend conferences and technical meetups. Participate in them as a presenter as much as you can. Ask people in your network for introductions to others.
You will find the networking aspect takes up a tremendous amount of time if done properly. Many don't like this, which is fine; these people tend to go back to being an employee.
Finally, make sure you don't spend all of your income as you get it -- that is, save a significant amount of money to cover the low points in your sales cycle. Your income as a consultant is highly "lumpy," meaning you will receive a lot of money at some points, then no money at all for a long time. Make sure you've budgeted appropriately, and you have enough money in reserve to pay for the "no income" parts of the cycle.
Hope this helps.