I really like this question. If I'm honest, it rarely happens that I don't finish stuff. But this wasn't some magical switch that happened overnight. Rather, a bunch of stuff, so this question kind of gives me an opportunity to reflect on what led to meaningful change:

1. Action vs Motion. A lot of comments alluded to this here, and the best I've seen it articulated was in James Clear's book Atomic Habits. You have 'Motion' which is thinking, imagining, whiteboarding, planning, talking about...everything that goes around the doing. And you have 'Action', which is actually doing. Motion is incredibly pleasant, but it's a trap. Action is never as much fun. Because soon enough you're going to get uncomfortable, stuck, frustrated. At the very least, recognize when you're in Motion and when you're in Action, so you're not trying to fool yourself.
See also Shonda Rhimes' "A screenwriter's advice" [0].

2. The closer you get to finishing something, the greater the resistance is to finishing it. This was articulated in Steven Pressfield's "The War of Art". IT becomes a struggle, and it's not fun, and anyone who tells you otherwise is flat out lying. There is fatigue from the project, and there's also the fact that it's not quite what you had in your head when you dreamed about it. Because you couldn't dream the imperfections. This this is not a fault of implementation (any creator will fess up to feeling this way). So acknowledging all of these and fighting through it is a crucial skill for getting things done.

3. Without a Process, there's not going to be an outcome.
I started as a developer, then switched to writer, and now I do both. It's the switching to becoming a writer that taught me how to get stuff done, because I honed the process. I knew what it would take to get a project from start to completion. Different projects take more or less time, but the stages are clear.
When I tackle something now, be it in code or in writing, I set up a roadmap. One that I can say definitively for each step, when it's done, and what's next.

4. Domain: it really, REALLY, helps to build up domain expertise in something. The tech is the HOW, but the domain is the WHAT and the WHY. Without a good WHY, odds are the project is doomed. A domain is really about mining more interesting questions, and staying engaged with ideas. So that even when you hit into difficulties, the curiosity about the problem helps you push through.
I'm kinda not surprised you'd give up quickly on building a solitaire with Y, cause who cares, right?
And the answer is...you don't care. You don't really want a solitaire, because you know that problem's been solved to a good enough extent that it simply doesn't matter.
It's hard doing things when you can get yourself to feel they matter. With a domain, this happens less.

5. So another thing writers say a lot is "Show, don't Tell". And at some point in my life I decided to take that mantra seriously. I felt I'm done with SAYING (on my CV and anywhere else) that I can do X, Y, Z. I was going to SHOW it. It just makes life simpler and easier when you can just shrug and say, "Yup, done that, here's the link." So the point here is that even if I'm doing something in order to learn, it HAS to have an outcome that can be offered to others. Whether they like it, or buy into it or whatever is a different question, interesting in its own right. But my view on folders filled with half baked ideas is that it's not good at all. If you've read "The Goal" (if you haven't, I recommend it) - this is is inventory, and it's a liability, not an asset.

6. Saying No. This is REALLY HARD. There is more stuff you'll want to learn than time to learn it. There are more projects you'd like to get done than the time you're awarded in life. And there is genuine pain in declining to do something you really want to do, because you need to focus on something else. But the alternative to this pain is, ultimately, those folders filled with half-baked ideas. Though I am getting better at saying no, I have yet to get better at not feeling the pain.

7. Time management. Everyone has the same 24hrs in the day. The only question is, how much of this time gets wasted. A lot of people I respect don't spend time on social media. Author Michael Lewis has talked about how it drains creativity out of you in small bits, like air going out of tires. I wholly agree. [Right now, with the covid situation, deep work is super hard. People are just dealing with it however way they can.]

[0] https://zenpencils.com/comic/161-shonda-rhimes-a-screenwrite...