I believe everyone has a different strategy for this, so here’s mine in case it’s useful to someone:
I noticed that when I procrastinate, it still weighs on my mind, often more (cumulatively over time) than the actual discomfort of doing the task in the end. Now whenever I have the chance and enough mental energy, I attack the task immediately, so I don’t have to worry about it. Basically I've trained myself to want to avoid procrastination-induced stress. It only works if I have enough mental energy for the task tho.
The second trick I use, for bigger or more (perceived) challenging things, is saying to myself I’ll just start it and get it rolling today, so I don’t feel bad about completely avoiding it. Sometimes, I get carried away and just complete it, but even if not, it’s still easier to pick it up (a short while later) - a win in any case.