If you haven’t really done anything to your crush, he may be acting so mean towards you because he doesn’t want you to get a read for how much he may like you.
There are some guys who worry that if the girl were to know whether he likes her or how much he does, it could make him look weak or vulnerable.
As a result, they become mean towards her so as to give off the impression that they don’t actually like the girl all that much, if at all.
Your crush may be worried that you will be able to pick up on certain cues that indicate that he likes you or the level in which he likes you.
In order to avoid feeling this transparent, he chooses to be mean to you.
Even though he barely knows you, doing this still makes the most sense to him.
This way, he is able to maintain a strong degree of control over your emotions, thereby making him feel that much more empowered.