A branch in Git is just a movable pointer to a commit. Creating one literally writes a 41-byte file under .git/refs/heads/ containing that commit's hash. That's it — no copy of files, no expensive operation.
When you commit on a branch, the pointer moves forward. Other branches stay where they were. Two branches diverge when each gets commits the other hasn't seen.
git switch -c <name> creates a new branch and switches to it in one step. git switch <name> switches to an existing one. The older form git checkout -b does the same. Use descriptive names like feature/oauth, fix/null-deref, chore/bump-deps — they appear in PR lists for years.