Go to the Git website and install the version according to your system, under the Standalone Installer section. When downloaded, just run the executable.
These are mostly already set up by the Git installer, except for the branch name. When using the Windows Git installer, be sure to select the second option, named "Override the default branch name for new repositories" and leave main as the default branch name.