Several possibilities:
You can go cold turkey: remove the software from your mobile and computer or you can reduce the time you spend with social media little by little. Use a kitchen timer or something like that - it should be loud to "wake you up".
You could set yourself small rewards for keeping this promise to yourself.
But at least as important: look for something else to spend you time. Take up knitting or gardening or riding a bike or reading a book (you know, these things made from paper with these quaint little signs in them) or use you mobile as a phone and talk to people. Keep yourself entertained :)