/etc/hosts blocking reddit, twitter, hn, etc. The DNS cache means there's a delay before unblocking works, too.
Reducing compile times and other waits that trigger procrastination.
If your phone is the issue, set alarms to say "get off", maybe mess with screen time features, etc.
I used to have the same problem as you when I'd get home from school/sixth form (mine had uniform). I found immediately changing from school uniform to casual clothes helped me code switch.
Oh, and merry Christmas!