Browsing social media while working is easily solved by not logging in on these services on your work machine or browser. I have social media logged in on another instance of my browser, so I actively have to switch profiles to browse social media.
This added step makes it hard enough to not mindlessly browse it.