In my experience phisical separation is the best for when you don't want to use your phone (for example, when going to bed or if you want to focus on discussions when having lunch) but that is not always possible - then apps like one sec or other tricks like setting your phone to gray scale, moving icons around, focus mode, screen time... All serve to nudge your brain into thinking if you really want to waste time.
For making better use of your time... Eh. Everyone struggles differently of course, but I'm unlikely to go out and run, or do focus work, when I would waste 30 minutes scrolling through Instagram. But if you make sure to have better alternatives (reading a curated feed, listening to a audiobook/podcast) then they can nudge you that way. Finding a better alternative is entirely up to you. I do find that writing down things you want to do, no matter how silly it sounds ("of course I want to read more books!") helps, especially as you can always reference to that list later when you're bored.