In this era of internet addiction, checking phone regularly is unsurprisingly common and it messes up your productivity. One of the solutions is to make it difficult to reach these apps (Instagram, Twitter, FB, etc).
In order to do this, you must place these apps away from the front screen, put them in one folder named “Useless apps”. It doesn’t always work, but at least extra efforts to reach these apps will give you time to reconsider your decision.
Fill your front screen with “good” apps like your fitness/workout apps, todo list, or any productivity apps.
I got this idea from Reddit. Hope it helps.