I transitioned to being a software engineer after 8 years in investment banking. Some people mention capitalizing on existing skillset and trying to find opportunities on your skills intersection. While this is certainly an attractive strategy, imo this only works if you still love at least some parts of your existing career.
In my case, I absolutely hated investment banking and this career and my Finance degree were wrong choices that I just didn’t want to admit to myself.
I started thinking what I used to enjoy doing before university and I realized that I always loved computers and even programmed a good amount of Visual Basic and Pascal back in days.
As for the transitioning process, I took the radical approach. I first combined learning to code (again) with my job but it was very difficult. So I saved 6 month living expenses, quit my job and locked myself in my apartment for studying. Ran out of funds before getting enough knowledge to land an actual job. Took side hustles from my previous career for about 2 years to continue learning. Eventually managed to land a job paying 25% of my past salary. But once I got into the industry, I grew rather quickly because of how motivated I was compared to my previous career.
The moral of the story is, if you feel like there’s something that is much better suited to your personality, it’s okay to start from scratch. It will be painful for sure, but the pain is temporary compared to a lifelong feeling of being miserable on a wrong path.