It is OK to flush hair down the toilet in small amounts as long as you flush the toilet a few more times to push the hair further down the sewer line although it's not recommended to flush hair other things that shouldn't be flushed down the toilet.
However if you have bad plumbing and are prone to clogs in your sewer main you should avoid flushing hair down the toilet.
Flushing too much hair down the toilet could clog it and so it's not recommended to flush any hair down the toilet and throw the hair away instead.
Just like hair could clog your sink and bathtub or shower drain the hair could get caught in the pipes and eventually lead to a clog.
I have flushed small amounts of hair down the toilet before but I don't make it a habit and will most often throw the hair away instead.
In general you shouldn't flush anything down the toilet other than vomit, poop, pee and toilet paper or blood or whatever comes out of your body.
Anything else should be thrown in the trash or it could lead to a clog which can be expensive to repair or fix.