Forming a habit is a marathon, not a sprint.

GIVE YOURSELF SOME GRACE

On average, it takes more than 2 months before a new behavior becomes automatic — 66 days to be exact. And how long it takes a new habit to form can vary widely depending on the behavior, the person, and the circumstances. In Lally's study, it took anywhere from 18 days to 254 days for people to form a new habit. 

In other words, if you want to set your expectations appropriately, the truth is that it will probably take you anywhere from two months to eight months to build a new behavior into your life — not 21 days. - James Clear