read the room
definition
to understand the emotions and reactions of people in a situation
example
Before making a joke, read the room to see if people are in the right mood for it.
word origin — A modern 2000s American expression — describes the ability to interpret the mood and signals of those present.