Time period I saw it was anywhere from late 80s to mid-90s, I believe. Was on TV, would have been some sort of comedy program.
A couple bearded scientist-type guys are stroking their beards and talking and one remarks that it’s a medical fact that stroking your beard releases chemicals that make you smarter and better able to do science, thus why scientists do it. They then throw a pitying look (and perhaps comment) at a younger, clean-shaven companion.
Pretty sure the framing was them facing the camera with just their torsos and heads in frame. Now and then, I stroke my beard and remember that half-memory but have no idea where it’s from.