The brain is very good at self-sabotaging when it can't figure out what or how to deal with certain situations though. The best thing to do is figure out why you're procrastinating before trying to fix it.
Paradoxically, I think just acknowledging procrastination as an example of a bad thing, but not the most important one, might work well.
I say this because anxiety around needing to do something important is one possible cause of procrastination in the first place, and yet there is nothing more anxiety-inducing than telling yourself that by procrastinating, you're failing to do the most important things first. Whereas instead, if you only go so far as to make a mental note of it when you catch yourself procrastinating, you'll give yourself a moment to reflect without giving yourself anxiety that perpetuates further procrastination.
Also, you may have a subconscious reason for not doing something. Procrastinating could simply just be your brain's way of letting a better idea about how to do it percolate. That said, forming habits of doing certain unproductive things could be a pointless loss of productivity. Like if you have a habit of checking social media several times a day you might try blocking yourself from that and see how much productivity you've gained. And after all, there are better ways of procrastinating than by checking social media, like going for walks, trying new healthy recipes if you cook, or even cleaning (I actually don't know how many times I've thought of a good solution while cleaning), etc.
Once you've done that, you can think about it in terms of optimizing time spent working vs. time spent in leisure, and acknowledge that the "good" forms of procrastinating are an important form of leisure, which, if you've optimized the ratio well, boost your productivity by restoring mental energy and increasing creativity. Technically this includes sleep as well. :-)