Basically the phone communicates with the venues via an AirTag like network and enters DND or becomes a school mode device.
It can be on by default, and some users like on call doctors or firefighter etc can override and take responsibility for managing themselves.
I would love my phone to know I’m in Church for a wedding or at a play and not have to remember to switch.