No trick. I just think about how happy I will feel once I complete that 1 task and then how happy I will be once my overall goal is met. I think of my goals more than the task
Find a routine that makes you feel good during and after. If you enjoy what you do, then it doesn't feel like a chore. Make changes gradual and not drastic. Start with 3 push ups, then work your way up to 10 or more.
The only way I've ever been able to keep a consistent workout routine is to make myself accountable to another person. That support has helped me get up and move when nothing else does.
Motivation. It's easier when you have a goal: to run a half marathon in autumn, to learn handstand, to be fit and healthy, etc.