Should I tell my 9 month old no when she pulls hair?

I know a baby at 9 months doesn’t understand if they shouldn’t be doing something , she doesn’t no pulling hair hurts. so as a FTM should I tell her no or just direct her to do something else?