You should be mentally prepared and really take action. When you want to smoke, you can try to go to some public places where smoking is forbidden, which can effectively help you improve your control. You can also eat some snacks such as candy or melon seeds. After a while, your addiction will pass.
Don't take electronic cigarettes and cigarettes with you when you go out, and don't go to the store to buy them. This will gradually form a habit and naturally make you less addicted to cigarettes.