Start a timer and say "I'll finish this task in 30 minutes". It helps my brain skip the random "new tab twitter.com" behavior.