Humans are creatures of habit. Plain and simple - this is a fact. What I'll have you consider is that the underlying stories in your own mind are the things truly driving your habits and behavior.
We are what we repeatedly do. We are also what we repeatedly think. Therefore, the thoughts you're having and the stories you're telling yourself are driving both the good and bad behaviors you exhibit.
For more information on habit-setting & breaking, here is a great resource: https://jamesclear.com/habits
Daily challenge: Identify one habit that you have in your life and list out the underlying stories that might be driving that behavior.