I’ve concluded that the culture we’ve built for ourselves, and the tech that permeates it, prevent human flourishing. So it should be no surprise that many of us struggle with what you’ve described. So I rely less on discipline and more on controlling my environment. I strive to make helpful activities the easiest thing to do, and unhelpful things the most difficult. I use MacBooks and iPhones and they have Screen Time where I can lock down anything I want and give the password to my partner to protect.
Below are two resources that have greatly influenced my opinion, the first is a lengthy podcast episode about dopamine, the second is a book about reversing “downward spirals”, specifically focused on depression but it applies to anyone. There’s a workbook that I highly recommend if you want high focus on application and less on the neuroscience
https://www.hubermanlab.com/episode/controlling-your-dopamin...
https://www.goodreads.com/book/show/21413760-the-upward-spir...