You shouldn’t have hope. I tell all of my younger relatives to “grind LeetCode and work for a FAANG” (tm) r/cscareerquestions.
I didn’t purposefully set out to work at BigTech, it kind of fell into my lap. I was also 46 before I landed at one. A returning intern that graduated in 2022 that I mentored had an offer that was the same as what I was only $20K less than I was making two years earlier.
If I were starting out now, I definitely would have been preparing for coding interviews. I have a lot more flexibility and experience at 49.