I always study whenever I have time during online school. Another thing that helps is finding a quiet place to sit and consentrate. You should build a time after school where you can study can keep that consistent.
A secret I am learning is your brain is wired for rewards. Set aside regular study time. Each morning, first thing, picture yourself studying hard and then picture yourself doing very well on your exam. Say to yourself, I've got this. I am smart. I am going to get an excellent grade because I studied and am prepared." When you brush your teeth, take a moment to look in the mirror and say, "I love school. I love to study." When you finish a study session, repeat that and do something you love as a reward. Art, read, workout, meditate. Don't use food. You've got this. Just change the way you talk to yourself. Think of long term, where you education will take you. That is why you study. For YOU.