Set up an environment that you actually want to stay in for a long time without unnecessary digital devices/things to grab your attention such as having a clear desk, open space with natural lighting or ambient light, mood music, and your favorite snacks around you. Or some enjoy dark rooms with a single light source to highlight what they should focus on.
Turn off/silence all notifications while you work. Your attention and brain space is a precious commodity. Don’t let it be taken at the whims of others.
Try the pomodoro method: 45 min of focus, 15 min break. If that’s too much, start with less time for focus and a longer break and work up to more and more focus time: 30/30 or even 15 min of focus and 45 min break. Celebrate your accomplishments.
Meditation can help not in the moment (because you are studying) but in improving focus in general. Also headphones with focus music like eg piano music can make it easier to concentrate.