My classmate has a weak immune system and, therefore, she often stays at home, being treated. She recovers, comes to school - and again she feels bad. At home, great. She was observed by a doctor, who told her that this organism, at a subconscious level, is struggling with conditions unfavorable for humans! I don’t know how true this is from the point of view of biology, but she really doesn’t like school.
It may well be a psychological reaction or a panic attack. If you don't like the word at all at school, sort out the situation, the problem is in the subjects, classmates, teachers or something else.
There are many reasons for this and no one, except a doctor who will examine you and take the necessary tests, will not give you an accurate diagnosis.
These can be problems with the gastrointestinal tract, and with blood pressure, and a lot of other reasons.