Users can configure Teams chat to use a comfy (default) or compact spacing. The new density setting works on desktop and browser clients. The idea is to help users make better use of screen space. I quite like the compact setting. For now, the new setting is available to preview users and will no doubt reach general availability in a matter of weeks.