When I start doing something that requires concentration at home, I've noticed that blocking access works better than trying to resist 🏕️ People will tell you to put your phone in another room, and sure, but I go further: disable app notifications, close the browser, use extensions like Freedom or Cold Turkey that literally prevent you from accessing certain sites for X hours. It's not about willpower, it's engineering. If TikTok isn't one click away, you won't open it.
Second is making studying the easy path. Open Visual Studio Code or your favorite IDE BEFORE you sit down, have your coffee already made, leave the tutorial paused but ready. When you sit, you just have to start without friction. Inertia is your friend: the first 5-10 minutes are the hard part, after that your brain enters flow mode and it's easier to keep going.
And here's what a lot of people miss: study in short but intense blocks. Two hours staring at the screen without moving doesn't actually work. Do 45 minutes on, 10 minutes off, repeat. In those real 45 minutes without distractions you learn more than in three hours jumping between tabs. With JavaScript especially, because it's a language where you need to write code, not just watch videos 💪 Hands on the keyboard from minute one.