Assuming you aren’t already experienced with programming, I think the first step is to confirm it’s something you enjoy and have an aptitude for. There’s many different options, but Progate is one I’m familiar with. They have free courses for the basics, and when I tried it, it seemed like a decent approach.
After that, improve your abilities until you can demonstrate you’ll be able to add value from day 1. Coding bootcamps are one way of doing this. There’s both Japan based ones and global online ones. I know people who have been living in Japan and made the switch this way with both kinds of bootcamps.
The Japan based ones should theoretically be able to help with finding a job here, though you still need to put in a lot of effort yourself. Code Chrysalis and Le Wagon Tokyo are the two English language options.
Another approach is to teaching yourself to code, and then get involved in an open source project or build your own personal project. It can take time, but I know people who have made the switch this way.
A totally different approach can be to look at your current job, and see if there’s some way you can incorporate programming into it. For instance, maybe there’s some tasks you can automate. This doesn’t work for every position, but if it does, it’s a low risk way to pivot your career.
Entry level software developer positions in Japan will typically pay between ¥3 and ¥6 million per year. Code Chrysalis states that their graduates earn an average of ¥5.7 million, but something to keep in mind is that 37% of their students are coming from a technical background, and they may be the ones pushing up the average.