Identify the reward you are getting from this habit (i.e. what are you craving or averting?).
Once you have identified the trigger/cue, routine and reward of the habits you are wanting to change, then you can consciously choose a different behaviour.
However, remember it can take some time to change your habits, so be kind to yourself!