OP here
First, learn the stuff. There's plenty of resources online. There's also tons of different sub-fields, so it helps to narrow things down to more specific things.
Web devs are a dime a dozen; pay is crap, and you're easily replaced by a thousand other guys with the same knowledge.
More niche stuff pays better. I'm in the blockchain space myself, which involves distributed systems, cryptography, game theory, etc. Pays pretty well.
Last time I heard, quantum computing devs are in really short supply because no one knows the stuff.
Machine learning stuff pays a ton. There are people easily making a quarter million a year doing that.
I've also heard that some niche languages like Erlang pay good money.
Software dev is an industry where you have to constantly be learning. College is mostly useless; 90% of what they teach you will be obsolete by the time you walk out the door. The rest is just fundamentals.
Everything you need to know is online, and most of it is quite openly available. You need to constantly be learning new things to stay relevant.
Building a portfolio of projects is also useful. If you've shipped any projects and had actual users, that's even more impressive.
As for how I get contracts, I know a guy with connections like you wouldn't believe. He finds work for me. Seems to mostly just be a matter of finding people who are working on stuff and offering your services.
If you know what you're talking about, and you're passionate about what you do, I find that it's not too hard to get introduced to people like that.