Salaries tend to obey the laws of supply and demand, so if there is high demand for a skill that few people can supply, then companies are willing to pay a lot of money for it. Conversely, if a ton of people can do the job, then it's not going to be highly paid.
To that end, my own electrical engineering career which pays $250k+ was the result of a few things:
1. I realized in college that most electrical engineering students were being lied to when they were told "analog is dead". Humans are analog, we interact with the world through analog means (sound, light, pressure, temperature, etc.). So for every 100% digital component in a system (embedded processor, micro, or other) there is a whole host of analog components which must convert the analog world into a string of 0's and 1's for that digital component to work on. I really liked analog circuit design and worked very hard in school to learn as much as I could in this area.
2. Towards the end of my master's degree, when I was starting the job hunt, it became immediately obvious that my theory was correct. Semiconductor companies were desperate to find candidates that could design and build high-performance mixed-signal systems, but were finding hoards of EEs that only wanted to code. I had my choice of jobs from several companies. I should note that among the specific industries needing EEs, semiconductor development tends to be higher pressure, but the pay is higher as a result. Starting pay: $75k
3. I chose a job with a great ratio of salary to cost of living. In my experience there was no need to live in California to make a great salary. I started in Dallas and then jumped on a great opportunity in Tucson. At this job, I worked hard to learn as much as I could, volunteered for opportunities, and did extra things that weren't required, like writing articles for external publications, filming instructional videos, sponsoring and mentoring university senior design projects. Pay grows over 5 years from $75k to about $150k (including stock compensation, profit sharing, bonuses).
4. Up to this point in my career I had become very good at practicing "empathy" for customers. That is, I would put myself in their shoes and imagine what challenges they were facing and wonder if my company had the right products to solve their problem? Furthermore, would our website recommend the right product to solve that problem? For this reason, my company gave me the opportunity to move into new product development. Previously I had only been supporting products that were developed by others. This is a higher risk position, because it involves convincing the company to invest a lot of time and money into turning your ideas into products. If those products fail the company loses money, competition gains ground, people lose jobs. For the higher level of risk, my pay grew to about $200k including base salary and all incentives.
5. My products do exceedingly well in the market. Who would have thought that listening to your customers, doing your best to understand their challenges and concerns, and then thinking long and hard about how you can solve their problem with a product that's both profitable for you but still within their budget, would be successful? These products also are developed on-time and on or under budget, because if you aren't a dick to your coworkers and appreciate their hard work, they'll really shine for you. For these reasons I was promoted to manage all new product development for my team and pay grew accordingly to the current $250k+ level.
5+ I admit my product developments tend to be riskier. I'm willing to push the boundaries of what's "possible" and do something that's never been tried before because I don't care if I get fired. I've got enough money saved up to survive for a while. This is where FIRE can really support your existing career. Technology advancement requires people willing to take risk, but engineers like me take intelligent risks and always have a backup plan.
TLDR: Identify an under-served need in the job market, become good at it. Chose a job that let's you flex your muscles in your role, go above and beyond to bring value to your team and your company, and do your best to understand your customers and what they care about. Volunteer for new opportunities and be willing to take some risks to go to the next level. Don't step on people on your climb up, respect everyone around you as a valuable connection you may need help from some day.