YOU CHANGED THE WRONG FILE.
You edited something you didn't mean to and haven't committed it yet.
think first
The change only exists in your working directory. Git still has the last committed version safe.
consequences before commands
git restore permanently discards uncommitted work in that file. There is no undo — Git never saw it, so Git cannot bring it back.