Looking at my career, it tanked at age 44, in 2007 due to the financial crisis, and has never truly recovered. Part of this is the reality of getting old. Age discrimination is real.
I am now 60, and still employed, but mainly with contracts, and even those have been difficult to get, in part because I am not a good interviewer.
My approach has been to focus on senior software engineering roles, even though that could be considered "junior" given my decades of experience.
All I can suggest is that you cram for interviews for whatever roles you are hoping to get. Read Cracking the Coding Interview, practice solving problems on Hacker Rank, cram for design and behavioral interviews, etc.
Yes, I had to practice doing l33t code bullshit. It is part of how we have to play the game.