I've made a few pivots:
-Started as a tech writer (major tech company) at an internship during college. Least glamorous internship in tech. I wrote a glossary for a database product. Stayed on the team after I graduated, eventually managed the tech writing team, and some of the UX side. Stayed for ten years. Not because I love it, but because I kept growing, kept getting promoted & paid more, and I'm a sucker for stability.
-Got my MBA (nights & weekends, while employed in above job) in technology management. After I completed my MBA, pivoted to a role (same company) that was on the content/marketing side. So, still in content, but not in tech writing. It was a good transition with the MBA. Continued to manage teams, but also managed some of the partnership side /business end with external partners. That was good exposure
-Moved into another role at the same company, focused on another vertical. Followed my manager to this team.
-My husband got a job at (another) big tech company, so we moved from Seattle to the bay area. His recruiter passed my resume along, and I ended up on the current team I'm at, although my job as grown a lot, as we're in the mobile space. It's been 8 years on the team.
I'd say the two biggest pivots have come with: 1) my MBA, and 2) random other switch that I've bolded. It was completely unintentional, and much more about following a good manager. That vertical switch set me up very well for the job I currently have. I now have 11 years of experience in a very specialized & high demand field, and...never quite planned it that way.
Ironically, I'm about to FIRE, because I had zero desire to go into tech. I'd planned to become a professional writer, but of the non-tech kind. I went with it for 25 years, because... again, sucker for security & the money. I have no idea what comes next for me. Definitely future work, but only because I want it, not because we will need it.
I've also suffered from the impostor syndrome, and it's hard. I don't think anyone "deserves" to make what I make. That said, I'm adequately compensated from a market perspective, and could pull multiple other offers at this salary band, if the right role opened up. I'm a woman in tech (and, even more niche part of the field) & so often struggle with whether I'm "good enough". I coach a lot of other people on this topic. Your current team/employer is paying you at your current salary because your skills, the market, or some combo of that dictate they should. Businesses are selfish. They aren't paying you that much out of the kindness of their heart.
If I were in your shoes, I'd take some time to thinking of 2-3 things I'd like to learn. Find a role that puts you on the correct path to learning those things. Or, learn them on your own time, while you think about a well paying role you can eventually qualify for, that would be more interesting than where you are now.