Sometimes, in order to increase your number of good habits, you must remove the bad ones. And to remove bad habits you can make them very difficult or even impossible to do. For example, unsubscribe yourself from all newsletters to stop wasting your time reading emails, or ask your friend to change the passwords on your social media during the week, so you cannot use it until the weekend.
It can be difficult for you to make these decisions but think about the outcomes. If you want to write a book, and you make bad habits impossible to indulge in (cutting social media, and blocking YouTube, Netflix, and other services), good habits will become inevitable.