There are many distractions and traps out there. Everyone is fighting over you attention. They want you to look at their profile, to like their picture, to buy their product, to see their show or for you to give them your attention. Your attention and focus are the most valuable thing you have.
How good you are at focusing is a predictor at how long its going to take you to finish something. If you know you are easily distracted then do what you can to eliminate distractions. Turn off notifications.
Start with short bursts of focused attention. Set a goal to focus on something for 5 min and no longer. Use interval focus to make progress. Keep making progress and it will become a lot easier.