I just started grad school so this is very fresh for me.
Practice mindfulness meditation. It helps me stay on task when I need to work and avoid rumination or letting work seep into relaxation/recreation when I’m taking a break.
Learn to be strategic with your attention and perfectionism. For example in undergrad I could basically afford to give every assignment my all, but I’ve found that now there is just not enough time for that. If a task is low-stakes, try to do a good job but get it done quickly. Reserve your motivation for bigger more consequential tasks.
Constantly work to become more efficient. Ask yourself if a task can be automated or multitasked without much loss in quality. E.g. I have to listen to podcasts for class sometimes and will play these while I am driving around doing errands.
Take time off. There is a saying in IT that either you can schedule maintenance or it will schedule itself. That applies to your body too. I have occasionally taken zeroes on less important assignments or taken a vacation day at work just to give myself an opportunity to recover. If you are really giving your all, then there is nothing to be ashamed of in taking breaks.
I just started grad school so this is very fresh for me.