This also reminds me about the classic way to form habits: creating a new identity. To develop a lasting habit, we have to be in an identity that all our behaviors are just a reflection of our identity. When identifying myself as a voracious learner, learning new stuff will naturally be the only choice I have. Or for The No Phone On Bed Rule I mentioned in Weekly I/O #20, telling my roommate that I will be a person who doesn't use my phone on bed also have "not using my phone on bed" became my only choice.
You can also find this habit-forming method in Atomic Habits.