Technically you could make unlimited $ if you build a startup the size of one of the tech giants.
However, the odds of doing that are essentially 0
Most startups fail, many more just don’t make that much money, and at any point you can end up back where you started after initial success making little to no money (or even losing money!)
With that said, focusing only on “max earning potential” misses a whole bunch of other stuff that might be more important. Like just getting a job with the skills you require gives you income+stability and a place to learn new things. Or freelancing gives you maximum freedom, at the cost of more responsibility. You could also setup a “side-gig” for extra cash which could increase your income flow, at the cost of less free-time.
The most reasonable estimate to how much you make, is check with your peers on how much they make, as this is the single most reliable source and should be your main focus.
Here’s stackoverflow’s salary calculator that leverages their survey results:
Now you might be asking “but what if I freelance, can I make more money that way?” Well you could, but due to the risk of being your own boss/marketer/salesman/ops/dev/support, you might be in over your head in one of these realms, and thus end up with more issues to deal with and less time to make $.
Its worth pointing out the most limited resource isn’t “how much $ you can make”, its actually time and your own drive. You can spend 5 years building an actual successful startup from the ground up and not see 1 cent of profit. Where-as if you spend 5 years just working at a normal job you already made more money, it might not be a massive startup buyout in the millions but it might not matter if your good with your run-of-the-mill job. An example of this is Elon Musk who was basically broke and sleeping at a friends house as he put all his time/money/effort into keeping Tesla afloat. Yes things are better now, but it was just a few days away from going bankrupt.
Finally, I quick word of warning. If your focused only on the money, then I’d just be careful. Development is hard, annoying, and isn’t a quick way to make $ at all as it requires a lot of personal investment to learn what you need to learn and keep learning as things change. Regardless of what path you end up focusing on, you gotta keep learning, to keep up, and without the right kind of drive you might lose interest.