I put the phone on silent and out of reach. If I can avoid a computer, I do. If the work requires a computer, I remind myself not to open unrelated tabs. I drink coffee or tea. And I sometimes listen to classical music so that I don’t get distracted by lyrics.