A typo in the last message is easy to amend. For one that sits a few commits back, I like to note the correction now and apply it later.
Point at the commit whose message you want to change:
git commit --fixup=reword:HEAD~1
An editor opens. Leave the first line, which starts with amend! and repeats the old subject, and write the new message below it. Git creates a small commit that holds only that message and no file changes. When you’re ready to tidy up the branch, run:
git rebase -i --autosquash HEAD~3
The todo list already has the new commit placed under its target and marked to replace the message. Save and close, and the old commit has its new wording.
A hash works in place of HEAD~1, and you can keep working and committing between the two steps. This option needs Git 2.32 or newer.
The rebase rewrites that commit and every one after it, so their hashes change. Do it on a branch that is still yours. If others have already pulled those commits, a typo is a much smaller problem than the mess a rewritten history gives them, and I would leave it alone.
Further reading: git-commit documentation, git-rebase documentation