$git pull origin your-branch is a shorcut which runs two commands one after another:
$git fetch origin your-branch$git merge origin your-branchSo:
your-branch located on your local repository with the version of your-branch from the remote repositoryyour-branch from your local repositorySo, if you're checked out on a different branch in your workspace (your-other-branch) and you run $git pull origin your-branch, it'll update your-branch on your local repository, then it'll merge your-branch from the local repository into your-other-branch in your workspace.
tdlr; run $git switch/checkout your-branch before running $git pull origin your-branch.