I was laid off over a year ago, and I should finally be starting a new job in a few weeks once the paperwork clears.
I think the following factors contributed to my long unemployment:
(1) At first, lousy market for remote jobs. Big layoffs from major tech companies made it an employer's market.
(2) Rusty interview skills. I wasn't at all ready for Leetcode-type tests, and I hadn't realized that I suck at live coding tests in general. Practice helped somewhat.
(3) Delays from testing the market to determine the new pay rate for my skillset. I.e., for a while I didn't apply to any jobs that paid well below my previous comp.
(4) Indecision about my technical focus area. I was doing DL compilers, which didn't really excite me. I wanted to break into traditional compilers. But I also worked on other skills to apply to specific job openings I'd found. In retrospect, I'd have been more successful just picking one focus area and going deep on learning just that.
I'm also a little over 50, so maybe there was some ageism at play, I don't know.