Yes, the "pecking order" is a term that comes from chickens. Chickens will peck at each other to establish a hierarchy.
peck·ing or·der
ˈpekiNG ˌôrdər/
noun
a hierarchy of status seen among members of a group of people or animals, originally as observed among hens.
I wasn't familiar with this term. Pecking order! Thanks for this