I have struggled with an existential crisis for two years of uni both in the second semester of both years.
I have learned that work is only work and fun is only fun.
Prioritize what you need to do first.
I can tell you how to mix it up. First get started on what you need to do. If it was an easy task, go onto the next task, otherwise reward yourself the way you see fit. I have 3 rewards, 1: puzzles, 2: netflix, 3: video games. Now I avoid video games until I finish one subject. Usually I play for a bit and if I lose track of time, oh well, lost time.
There are external factors too like emotional health, physical health, happiness, food, sleep.
In my first year, I was happy but my emotional health was shit. The times I wasn't happy, I was battling myself. I also realized my potential that year when work was so much harder that it used to be.
Physical health, this one is very subtle but it plays a rather large role on motivation. I work out, at first I hated it cause it was BOOORING, but it was a way to get my mind off things. The buzz after working out felt amazing and it allowed me to work faster. (This is a slow change but it is totally worth it. Plus learn how to work out too and trust me on this).
If you ain't happy and you know it, you ain't clapping your hands. This is straightforward. Give yourself something to look forward for and you'll be clapping your hands in no time.
Food. Eat what you want to eat, but I suggest opting for something that's healthier. I know junk food is fast and easy, but junk food is not nearly as tasty as healthy food. You ever eaten a fruit and the juices comes gushing out? You'll get more juices and nutrition than a pack of fruit gushers (the gummies).
Sleep is the most important one of all. Go to bed at 12 or 1 and you'll always have a clear mind. There is a reason why sleep deprived people are less effective. Honestly, I'd rather get a 0 on a assignment than lose sleep. It also reduces mental health issues sooo..... Stay rested.
Also about alcohol, I steer clear of it because it really screws with my REM sleep (aka quality sleep). It may help you fall asleep faster, but for sleep it's quality over quantity.
Also people bragging how much they slept are not doing it right. Having a good quality 4 hr sleep is worth more than a 10 hr cheap sleep. If you're going to brag about sleep, do it right and brag about the quality of sleep.