You don't need to 'try harder'; you need to question your motivation for the habit in the first place. Either a thought will click that clarifies why a habit is actually important, or you'll realise you are pressuring yourself to take on a habit that doesn't really matter to you (when you strip away the bullshit)
edit: and if the importance finally clicks for you, you'll generally just start working on the habit. I struggled with weight for years, and then eventually motivation/understanding clicked and I lost 6stone/40kg/90lb in around 18 months (and have lost a little more since, and kept it off for years).