Tiny Little #LifeHack:
Make a playlist for every task you need to do. Homework, writing project, dish washing, whatever... give it a playlist and use it whenever you are doing the thing.
If you can't get yourself to do the thing, play the playlist. In most cases, that gets the brain to do the work.
If none of these are working your brain is either tired, hungry, or holding onto something that won't allow more data into the work space.
Give yourself a breather, get some water and food, and rest if you need it. Be kind to yourself.