Using winget tool:
Install winget tool if you don't already have it, then type this command in command prompt or Powershell.
winget install --id Git.Git -e --source winget
The current source code release is version 2.47.0. If you want the newer version, you can build it from the source code.