Staying focused when writing a paper is a common experience, but there are many strategies you can use to maintain your concentration!
One thing I love to do is create a dedicated workspace. This involves finding a quiet, comfortable spot where you can work without distractions. Ideally, this space should be reserved solely for work; this can help signal to your brain that it's time to focus.
The second tip (that others have mentioned) is to clear goals. Before you start, outline what you'd like to accomplish. I recommend dividing your paper into smaller sections (or goals) to make your project feel more manageable. This will also help keep you motivated!
There's a popular technique called the "Pomodoro Technique". I personally get distracted pretty easily when writing or reading and I've found this method works great in helping me finish tasks! The technique is pretty simple. You simply work in bursts (usually 25 minutes), followed by a break. This technique can help maintain high levels of focus and prevent burnout. I recommend using a timer to set your preferred amount of time (25 minutes, 60 minutes, or another increment).
The last thing I'll recommend is to try your best to limit distractions. This means setting a "Focus" on your phone (or "Do Not Disturb"), turning off or pausing notifications on your phone and computer. If you need the internet for research, consider using apps that block distracting websites during your work sessions.
Reach out to me for more tips! And best of luck.