A fresh git init without this setting starts on master and prints a hint that the default changes to main in Git 3.0. One line of config picks the name and the hint goes away.
git config --global init.defaultBranch main
From then on, every new repository starts on main. Use whatever name your team uses; git doesn’t care. For a single repository you can also pass it once: git init -b trunk.
I’d set it because most hosting services, GitHub and GitLab included, use main for new repositories. When the local name matches, pushing a new project and setting up tracking needs no renaming.
The setting only affects git init. It doesn’t rename branches in repositories you already have, and git clone ignores it: a clone simply takes whatever default branch the remote has. To rename an existing master to main, use git branch -m master main, then push the new name and change the default branch on the server. Scripts and CI jobs that hard-code the old name need updating too, which is the part I’d check first before renaming anything in a shared project.
Further reading: git-init documentation, git-config documentation