You have the wrong idea. It's not skills that pay, it's companies. Learn to crush the interview circuit for the companies paying 300k+. There aren't that many.
There are a handful of companies that pay exceedingly well (Google, Facebook, Microsoft, Apple, Netflix, Uber, and a handful of others). Their hiring and interview practices are well documented across the internet.
The website levels.fyi will give you some insight into which companies can afford the rates you're talking about.