Recently it seems something changed over on the Epic Games Store and so third-party programs trying to login like the Heroic Games Launcher would fail. Thankfully a fix was found.
Legendary, the name of the kit that the Heroic Games Launcher is built upon for its Epic Store integration was updated and so the Heroic Games Launcher has pulled the latest version in. With Heroic version "2.4.2 HOTFIX #2" you should be good to go on logging in and downloading games once again.
Giving it a test myself with the new hotfix and yup — it works again. Great work to the developers doing this.
This is of course a good reminder that the Epic Store doesn't support Linux and the Steam Deck in any way, so they can break anything whenever they like and it's up to the people working on third-party stuff like Legendary and Heroic to figure it all out for us. This is why buying from Steam directly (or Steam keys from legit stores) is usually your best bet for Linux and Steam Deck.