I think most people struggle with this if they recognize this as a problem. I use https://freedom.to to set up times of day when I can access social media. And yes, sometimes I shut this down when I want to cheat.
For me the best life hack to avoid wasting even more time is to rely on my Apple Watch to get phone calls and text messages, and leave my iPhone at home. This is sort of like using an old flip-phone because it takes accessing social media off the table.
That's good that you found something that works for you.
My phone isn't actually the big distraction point for me, I don't have social media apps and barely use it, it's more my iMac and sometimes my iPad too.
I guess I need to find something that works for me, i'm yet to figure that out yet though.
For me the best life hack to avoid wasting even more time is to rely on my Apple Watch to get phone calls and text messages, and leave my iPhone at home. This is sort of like using an old flip-phone because it takes accessing social media off the table.