At the beginning of one year, my middle-grade students charged into class like Mel Gibson and a thousand Scottish warriors. To solve the problem, I asked my kids to line up for class outside my door with their left arm against the wall and a foot of space between them and the person in front of them.
To enter class, each child had to answer either a content-related question or a random dumb question like, "What type of weapon would you use to battle Aquaman?" The dumb questions kept the line entertained. After answering, they were directed to take a seat, quiet as moonlight, and follow instructions on the board. Students talking or violating any of the protocol were sent to the back of the line.
A list of strategies for successful classroom management, Source: https://www.edutopia.org/blog/big-and-small-classroom-management-strategies-todd-finley