Imagine solving a hard problem while messages keep arriving. You answer one, then have to work out where you left off. It happens again and again.
In Deep Work, writer Cal Newport recommends setting aside time for difficult work with distractions shut out. Closing messages for that session leaves more time to follow one problem, and less time restarting after each reply.