I ran into this recently as well. I kept getting 'unauthorized' to a repository that my standard GitHub account had no problems pulling. It WAS a private repository of course.
So at a top level:
You can either do say a git clone via:
git clone httpS://user:password@githib.com/org/repo.git
Of course, it's a pain every time (and not documented in the git intro pages)
Or, git CLI can store your user name/password in a secure, encrypted store called the Windows Credential Store. This is what you told git to do when you entered git config --global credential.helper wincred.
Then you just do
git clone httpS://githib.com/org/repo.git
and it magically works, using your stored credentials. When Git notices it's a private repository, instead of prompting for user name/password, it goes to the Windows Credential Store and gets your username/password, and uses that. It transmits over https in a secure manner. I'm stressing httpS to show that this only works over https, but if you click the 'copy' command on a Git repository, https is the default.
In theory, git SHOULD prompt you for a user name and password if you omit them, and your user name/password weren't stored; and then store them for subsequent uses. In my case, it didn't. Read on for the fix.
Where is it stored?
Click on "Start" then type "Cred" and go to the Windows Credential Manager.
Then click on "Windows Credentials."

There may be a github entry in the middle of all of the stuff. (This is a good chance to review stored passwords!) In my case, I had the git entry, and I swear I haven't changed the password in ages, but all I had to do was reenter the password and then git clone worked fine with my user name as specified.
To validate where you are set, type
git config --list
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
http.sslbackend=openssl
... lots of stuff
credential.helper=manager
.... this is important:
user.name=John Q. Public
user.email=example@users.noreply.github.com
winupdater.recentlyseenversion=2.25.0.windows.1
.... more stuff
credential.helper=wincred
I tried to sanitize the juicy bits. You can validate the last line with the CLI command that you entered. To find where "wincred" is, follow the steps above the picture.