Was this an iPad provided by the school? If yes, I am wondering if they have set it up to be managed by school IT administrators. If it was provided by the school ask them about how to set it up.
If it was not provided by the school, what is the exact wording of the error message(s)? The most likely issue that matches what you say is:
If a message says your Apple ID is locked or disabled "for security reasons"", the document If your Apple ID is locked or disabled - Apple Support directs you to reset your password as outlined in this article ➞ If you forgot your Apple ID password - Apple Support
If you use two-factor authentication and can’t sign in or reset your password, you can regain access after an account recovery waiting period, as outlined in this document: How to use account recovery when you can’t reset your Apple ID password - Apple Support