In brief
A Git branch is a reference to a commit that normally moves as new commits are recorded. git branch lists local branches, and creating one does not necessarily switch to it.
Useful to know
A Git branch is a reference to a commit that normally moves as new commits are recorded. git branch lists local branches, and creating one does not necessarily switch to it. [1]
Check the current branch before working. Distinguish a local branch from a remote-tracking reference such as origin/main. They can point to different commits, particularly around synchronization with the remote.
Sources
For further detail and to check the information: