Block out your time and use the flight mode. For example I do most reading on my phone so I basically put my phone on flight mode for an hour or 2hrs and get busy with reading then take 15mins break by going back online. Choose the best time that works for you.
If you have an iPhone, you can use something called Downtime, and assign certain apps to switch off at a certain time each day. You can also create app limits to help you spend less time and you can monitor screentime to track your progress. Hope that helps!