I have this issue too. Smartphones are hard to break away from. I am still working on a fix. One thing that has helped is to log out of all my social media. This means that I have to a) remember all my f***ing passwords, b) prevents me from being able to refresh compulsively. Basically, it creates a barrier that gives you time to think and makes it harder for you to do it.
Depending on when you use the phone, I suggest keeping it far away from you. I sometimes go on as soon as I get up, something that is so unhealthy. Try to keep the phone in another room where you’ll have to go get it.