There are two reasons that students may get the message "You don't have access to this class".
(1) The student's account isn't managed by a school
To solve this, check the email address on the message to make sure it's your school email address and:
If it isn't your school email address: log out and log in with your school email address
If the email address is your school email, get in touch with the school IT technician and get them to add it to the school management system
(2) The student is not connected to the class in the school management system
To solve this, check the class name and email address on the message.
Make sure you recognize the class name, you might be trying to access the wrong class. This might happen if your teacher gives you the wrong assignment link by accident.
Make sure you are logged in with your school email address
If both the email address and class name are what you expect, get in touch with your teacher or IT technician so they can connect you to the class in the school management system.
Here is a video guide on how to solve these issues: