Start your habit the same way every time.
Give your habit a simple first step, like putting on your headphones first before every walk. On days when your motivation wanes, tell yourself you’ll do just that first step. Often, the rest will follow automatically.