A teacher says in their own words, ‘One should have a good intention.’
• This may be useful religious advice;
• but the teacher has not reported it from the Prophet ﷺ;
• so the sentence is not, by itself, a Hadith.
A religious subject is not enough; being transmitted concerning the Prophet ﷺ is an essential part of the definition.