I don't have an answer for you, but out of curiosity, is the freeze exactly 25 seconds? Because if so, it suggests that something is waiting for a dbus response that never arrives. Maybe a desktop portal request, for example. (The dbus timeout defaults to 25 seconds, IIRC.)
Also, while it's frozen, you might want to check beneath all the open windows to see if a new window has appeared behind them. It's possible that Steam opened a dialog box that's waiting for you to respond to it, but it somehow didn't get brought to the front.