Breaking a life long habit

Hi Brooke and other amazing coaches 🙂
Do you have any tips for breaking a habit that I do before I even realize I’m doing it? I’ve been cracking my knuckles for the longest time and I have had it in my mind for years that I am going to stop. I find myself doing it without any awareness until after I’ve cracked them. I am trying so hard to allow the urges when I do have the awareness, but what do I do to get awareness ahead of the habit?
I do want to change this habit. My hands are starting to be painful and while I don’t know if it’s directly related, I do know it can’t help (except in the moment, when it seems to provide some relief).
Thank you!