I went from Law to Software Development after 30. I was a lawyer for roughly 10 years before the change and even was a partner in a small law firm.
For me the key was just to see this huge change as a series of small steps instead of a big "flip the switch and change" move.
Before I changed, I took courses in programming to see if I'd like it, I build projects in my own time to see if I would actually pursue it.
Even once I decided to change careers, I still kept my old things ready in case I needed a fallback plan (this happened over 10 years ago but I still pay my Bar fees every year).
For me, doing it slowly, with a plan, and a backup, removed a lot of the pressure and risk of the change and it worked fine.
I haven't done anything in Law in over 10 years now and am fully "converted" to development.
My advice for you: buy some Cybersecurity courses on Udemy. They might not be perfect, but they are usually cheap (always wait for sales) and see if you will like it. You can take dozens of courses for 9-12 USD there to see if that is the path before committing to something more serious and expensive.
This is just to see if this is really the area you want. The day to day of most careers tend to be heavily romanticized from the outside.
Once you've done that, try to see if you can find some education with a Co-Op component. I found it is much easier to get your foot on the door of a new career as a Co-Op in a course, though that is not required.
I'm in my mid thirties and have often considering moving from software to law. My software path tops out at around $200-250k so the upside on law seems better if you look at the big opportunity cost and lower wage periods with some rose colored glasses ;)
I’ve got bad news for you if you think the average lawyer makes more.
Unlike the normal distribution in your link, earnings in the legal profession follow a bimodal distribution. The mean/median earnings of everyone from public defenders and law firm associates isn't typically representative of actual incomes.
As does software development. What are the chances that he ends up in the FAANG equivalent in law?