How should I format my commit messages?

This is the best way I've found: https://www.conventionalcommits.org/

Use CommitZen to automagically do this ^

It's also really great for automatically generating changelogs etc.