'Herd' is a collective noun that refers to a group of animals such as cattle. 'Herd mentality' is thinking or doing something simply because one sees others doing it. Another closely related colloquialism is 'hive mind' (referring to the behavior of bees in a hive. Another is 'group think.'
The herd mentality of people can be seen in stock market bubbles (and panics), fashion trends and fads, and crowd flow behaviors.
The vacationers' herd mentality was shown when they all crowded onto the same well-known beach, even though there were pleasant, more isolated beaches within walking distance.
Hope this is useful. All best wishes.
Student or Learner