It's extremely difficult to break a habit, but a lot less difficult to replace a habit.
Meaning if I'm able to examine the habit (usually a compulsion or mindless ritual to pass time or ease some anxiety) and understand the role it plays for me or benefit I think I get by continuing it, even if I could never imagine just stopping it completely, it's surprisingly easy to just do something else [intentionally do a specific different thing] upon the moment of urge to doing the bad thing. Eventually I just forget about the thing I did before, and my life becomes easier and simpler.
Because you mentioned books, if you happen to have one of the classic bad habits of modern life (smoking, drinking, eating), I'm always amazed how often people cite reading Allen Carr's "The Easy Way"series as the absolute only thing that somehow, magically, against all odds, worked for them. https://www.amazon.com/Allen-Carrs-Easy-Stop-Smoking/dp/0615...
[0] - https://www.amazon.com/Allen-Carrs-Easy-Stop-Smoking/dp/0615...