There are all sorts of great resources about how to business online, but it didn't even cross my mind at the beginning that that would be important. Once I started learning how to business freelancing became waaay easier.
Things like how to invoice, how to negotiate, how to talk to a client, how to schedule your time, how to budget, how to market yourself, how to network, etc etc etc are not at all related to programming, but can make the difference between a happy freelancing existence and a miserable career.
I've been fortunate to have a pretty lovely freelance web development career. My key has been finding clients that are smaller companies and not full time, with a long ongoing project.
Smaller companies allow you to build a relationship with the owner of the business, and to position yourself as not just a pair of hands to write code, but a trusted advisor who takes the business's actual needs into account when writing code (which is how you compete with global talent).
Not full time means you can have multiple clients at once to give you a nice advantage over a full time job: if one source of income dries up, your income doesn't go to zero.
Most of my clients have been multi-year projects. I'll slowly build their webapp for around 10 hours a week at most. I've worked about 20 hours a week for the last 8 years, lived in lower cost of living areas, and spent the rest of my time on doing whatever I feel like.
Some resources I'd recommend:
* The Personal MBA by Josh Kaufman - a nice overall summary of how to run a business
* The corpus of Kai Davis's material (https://kaidavis.com/), including his super valuable/highly entertaining podcast Make Money Online (https://makemoneyonline.exposed/)
* How to Win Friends and Influence People by Dale Carnegie - how to interface with fellow humans (freelancing/business is mostly a human activity)
Happy to help anyone who's interested in freelancing if I can, send me an email.