An old stash often refuses to apply because the branch moved on in the meantime. git stash branch sidesteps that by going back to where the stash was made.
git stash branch login-form stash@{0}
Git creates a new branch called login-form at the commit you were on when you made the stash, switches to it, and applies the stash there. Since the code is exactly as it was back then, it applies without conflicts. If that worked, the stash is dropped. Leave out the stash name and git uses the newest one.
From there it’s a normal branch. Commit the work, then rebase it on main or merge main into it, and solve conflicts the usual way, with commits to fall back on.
It also helps when a stash grows into something bigger than a quick save. Work that lives on a branch shows up in git branch, can be pushed and doesn’t get forgotten the way a stash does.
It even restores what was staged and what wasn’t, the way the stash recorded it, which I think is a nice touch.
Your working tree needs to be clean enough to switch branches. If you have other uncommitted changes that would be overwritten, git refuses and tells you which files are in the way. And the branch name must be new; git won’t reuse an existing one.
Further reading: git-stash documentation