If the goal was simply to learn and stay sharp, then perhaps an incomplete project is a success——you did some coding, and learned something about what motivates you. If the goal was more specific, then perhaps you've (subconsciously) re-evaluated the requirements for success, and it no longer feels achievable or worth the effort.
I could be wrong, of course, but this sounds less like a problem of technical ability than one of deepening your understanding of your own motivation. If that sounds right, maybe check out https://x.com/scottdomes — I like his writing about how to identify what you want and why.