Three places, and which command touches which
The undo commands look arbitrary because they are usually learned as recipes for situations. They are regular once you ask a different question: which of the three places is this changing?
The three places from the first lesson are the working directory, the index, and the commit history reached through refs.
history index working dir
commit new - -
git add - updated -
git restore - - reset to index
git restore --staged - reset to HEAD -
git reset --soft ref moves - -
git reset --mixed ref moves reset to ref -
git reset --hard ref moves reset to ref reset to ref
That table is the entire confusion, resolved. reset has three modes because there are three places, and each mode goes one place further.
So --soft moves the branch and leaves everything else, which is why it is the way to squash: the changes remain staged, ready to be committed again as one. --mixed, the default, additionally unstages. --hard additionally discards your working files, and is the only one of the three that can lose uncommitted work.

