Remember the only field that guarantees freedom and doesn't cap your salary is being self employed. There are youtubers, e-commerce store owners, etc... that are making as much or more than doctors, lawyers, judges, etc... The beautiful thing is you only report to yourself, and the IRS.
As a current software developer, I too can say that in my first year(more than 10 years ago) entrepreneurship was also my favourite class lol. The lecturer was way better than any of my other lecturers and classes had more of a fun aspect to it.