I have an iPhone but I don't use any social media (beside business related topics). At a certain hour, I switch on do not disturb mode - and problems are for tomorrow.
Option A - not installing said apps at all
Option B - using focus modes/Android Wellbeing (and the iOS counterpart) or even battery saver's "disable all apps other than x" features
Lock everything behind a difficult to type password. If that’s not enough, ask a friend to set such a password for you without telling you what it is. For optimal lock-out, ask a few strangers that don’t know each other and that you’re unlikely to ever meet again to each type a part of such a password (warning: this may make it impossible to download security updates or even to restore the phone to factory defaults)