It sucks to hear that you have been having troubles lately. Sometimes what I like to do when I've lost motivation is to just go back to doing something that I enjoy. Not something necessarily productive, but just something that relaxes you, makes you feel happy, and something that you find fun.
For me, this gives my brain a break to then come back to being motivated to do more important things such as studying for uni, going to work, doing chores, etc.
Do you think this is something that can help you?