Once the mental pathways for your habits have become encoded in your mind they stay there. It's more effective to introduce new behaviours to old habits.
"Quitting" is hard, relies on your limited willpower and doesn't tell you what to do instead.
Charles Duhigg, in his book The Power of Habit, explains that there are three parts to a habit: The cue, the behaviour, and the reward. It's not just the behaviour. The behaviour is easy to see.
Determine the cue: What's happening to prompt the habit? Is it a time of day? A group of people? A lull in activity?
Determine the reward: Is that coffee a caffeine hit or a social one? Do you want the break your behaviour provides?
Once you figure out the reward you crave, test different behaviours that could provide a similar reward.
Then practice it. That's how you can change your destructive habits into constructive ones that scratch the same itch.
If you want to start a new habit, acknowledge the same three step habit cycle. Decide on the cue. Do the behaviour then give yourself a reward. Maybe chocolate.
This sounds a bit like training yourself like a dog, and it works much the same way. Habits happen deep in the brain, without much conscious effort. That goes for dogs and people. Habits don't need willpower. They just happen.
Here's the thing: you will have habits. You're better off having habits you've chosen on purpose than habits you've acquired by accident.