At the start of the year or when I first meet my classes I set classroom expectations and rules with the class. Rather than coming up with a set of rules that the class must obey I turn this in to a class discussion. As a class we set the rules together.
I did this with my Year 9 tutor class at the start of the year and I found this a really useful approach to establishing rules and expectations. It allows member of the class to discuss what is important to them and what helps with learning. We take this opportunity to discuss things like eating and drinking in class (ok if they clean up), headphones (ok if they take them out when others are talking or for instructions etc. As a class we often decide what should be done if a student is late. For example with my Year 10 class we decided 5 minutes late was ok but any time after that will be made up at interval. Students then have a tenancy to follow these rules because they are given some agency in creating them but also because the process has been co-constructed as well.
Furthermore, at times throughout the year we could revisit the rules this was especially valuable for classes I was having behavioral issue in because I could gently remind the class these were their rules.
In summary, co-constructing class rules with students is a useful way to establish a safe, culturally responsive learning environment.