Once I had changed my soc media passwords and encrypted them in a way that it would have taken several hours to bruteforce. Thus I could stay out of them until I felt being in a better place without losing them, and in the meantime I would not give in due to some impulse because in the time I would put an effort to decrypt them the impulse would be gone. That's the only thing that worked, just blocking access somehow or whatever did not work because it was too easy/fast to circumvent.
I use an app called Clearspace on iOS - it hooks into the screen time API and prompts you with a "breathe in / breathe out" timer before it allows you to unblock the app. It also lets you unblock it for a specific configurable time period, and auto-closes the app once that period expires.
I found it gives me just enough friction that most of the time, the impulse to open the app passes while I wait for the breath timer to run out. Simply using the OS screen time limit on its own is not really enough, because it's too easy to dismiss and override the block. Having a brief timer to help you consider whether my action is intentional or driven by anxiety or thoughtless boredom really helps.