The first step is to notice why you're using the phone. Since this habit is likely very strongly engrained it will be difficult to notice.
Here's an example from my life:
I'm working on problem -> I don't understand what to do next -> I feel confused and anxious -> This feeling is unpleasant and I want to avoid it -> I pick up my phone to browse something meaningless to take my mind off of the unpleasant feeling.
Your exact triggers and feelings might be very different. Finding the pattern of your thoughts is the important thing. With this in mind, you can start to understand why getting rid of the phone probably won't help. You will just replace it with another activity.
I tried switching to a dumb phone and cutting the internet off to my house for 6 months. It didn't help that much. Instead I would deal with the unpleasant feelings by watching TV or picking up a book.
Your habit was built over months and years. You won't change it in a day. The first step is just noticing your feelings (harder than it sounds!).
I recommend the book Indistractable [1]. It gives a lot more detail about how these internal distractions are the root cause of a lot of procrastination habits. Just reading the book will not fix your problem in the same way as reading a book on running will not get you through a marathon. You have to put in the work over weeks and months.
Good look. With time and effort you can change this habit.