A habit is a settled or regular tendency or practice, especially one that is hard to give up. In various parts of Psalms, David repeats that his desire was to observe the commandments of God. In order to develop new habits, we have to keep doing God’s Word and will regularly. Scriptures in Hebrews tell us that solid food is for the spiritually mature, whose senses are trained by practice to distinguish between what is morally good and what is evil.
To develop new habits, you have to exercise over and over again. If you fall, you rise up and start again. Over time, your senses will be exercised to distinguish between what is good and what is evil.