I often fall into the trap of starting projects, throwing a bunch of code together and then abandoning a project. There's a great way around this though. If you start by planning, making issues, adding CI/CD, testing and linting it forces you to think about the structure of the project.
I've become so much more productive now that I'm doing all the steps I'd take at work when developing software. Sure, I'm the only one reading the project wiki now, but I think the odds are higher that someone else will use it just by the fact that I'm thinking long term.