Habits are cycles in your brain that repeat between the cue the routine and the reward the cue is what triggers the start of the cycle the routine is what you do in the habit and the reward makes the habit want to repeat and craving is also what makes you want to repeat the habit for example if you wake up at 10 A.M. and have breakfast the cue is waking up the routine is making breakfast the reward and you crave it because it tastes good so if you don’t have it in the morning you will always be missing it for the rest of the day
this is kinda the way it goes

the cue is waking up the routine is the rat walking to the food and the reward is eating the food and when there isn’t any food it creates a craving for more food .
To change habits you have to change nothing but the routine you keep the cue and you keep the reward so if this rat instead of walking to the food he wanted to fly he would change his routine to flying to the food instead of walking he would still do it every time he wakes up and he would still eat the food this is what I know of habits right now later I might edit this with edited knowledge but bye I hope you learned.