I feel like there is a sideblock somewhere in one of the 5e books about a social contract of sorts.
Does anyone know the book and page number?
Role-playing Games Stack Exchange is a question and answer site for gamemasters and players of tabletop, paper-and-pencil role-playing games. It only takes a minute to sign up.Sign up to join this community
There is a sidebar titled "Code of Conduct" at the start of Appendix A: Shared Campaigns (XGtE, p. 172). It specifically suggests agreeing on one for shared campaigns where the DM role is shared, but the same guidance could be applied to normal campaigns as well.
Other aspects like Table Talk and parts of the social contract can be found in the chapter 8 of the DMG: Running The Game (specifically DMG 235-236, 260).