If you have a ton of work to get through, I suggest sacrificing a song to put on repeat and then just drilling through the work, and only when you're finished you can listen to a different song. This method worked for me when I had several sheets of math homework to get through and not enough time, so I can't guarantee it'll work for every people but that's my advice (oh also try to limit other distractions such as social media, people and stuff like that because it's hard to work for a long period of time if you're constantly waiting for a notification or something)
So one thing that really helps me is pomodoro timers. I study for 25 minutes and then take 5 minutes as a break where I get up from my desk and do something else. I don't always do 25 minutes on, 5 minutes off. If I'm really unmotivated, I'll start with 10 minutes on, 10 minutes off just to get momentum going. How I study is different for each class. For a class that had a lot of reading, I do the reading and review notes the teacher has posted before class. Then I review them after by rewriting lecture notes and the book notes as a summary in my own words. If it's problem based class like physics or math, I just drill the problems and find similar problems.
try to give yourself rewards for motivation, for example maybe say "i'll get to eat a muffin if i study 20 pages". also if you find yourself losing motivation at night try to study/get work done earlier in the day if you are free then
make a study plan, I know it sounds simple but make a realistic plan you can follow. Another thing to do is change your wallpaper before exams or an important test. Change it to something that would make you feel guilty for not studying, this could be a quote, picture of books or even Namjoon saying that he'll shave your eyebrows if you don't study... if you choose the right photo it would likely reduce your browsing time... Also, you have to be strict with yourself, don't lenient. Any dream that's worth something has to be accomplished with a fight, even if that fight is with yourself.
Take breaks for like 5 mins. Don’t study through the whole time, take some breaks. Have some food beside you and and a bottle of water.