This is why I prefer retraining one's thinking using simple self talk.
If you will use a phrase like, "I don't do that anymore" every time you think of smoking, there is no willpower involved but, you are creating new neural pathways and the change happens.
https://bigthink.com/neuropsych/law-reversed-effort/