Asalamualykum,
Day 1 - Force yourself, keep a reminder, write a schedule for the day.
Day 2 - Do the same. Consciously remind yourself.
Day 3, 4, 5, 6, 7, 8, 9, 10, 11 - Same as above.
Day 12 - You may notice it is slowly becoming a habit.
Day 13, 14, 15, 16, 17 - Keep doing the same act.
Day 18 and beyond - In sha Allah a habit?
But you still need to push yourself in achieving your goal as the temptation to sin will still be there.
Focus on the end goal - i.e. If it's a religious goal, keep thinking of Allah swt pleasure and receiving the book of deeds in your right hand. In sha Allah.