I agree that clear cut life objectives are important. This generates a competing interest which is the best way to defeat any addiction.
But working on non-impactful personal projects is also not as bad as doomscrolling twitter. Personal projects are a good way to build skill and grow your own confidence. Twitter doesn't build anything of significance.