You can follow these instructions:
At first create a repo at GitHub. Then go into your local folder. Open a console. Enter these commands one after the other.
git init
Initialises git in your local folder.
git remote add origin https://github.com/...
Clone your Github repo.
git pull origin main
Calibrate repos. The "main" means that in this case the content of the main branch is copied to the local repo. Other branches can be created in addition to the master branch, but I will not go into this in detail. For the beginning, it is sufficient to have a simple master branch.
git branch -m master main
So what are we doing here? First with the -m command we are moving the git history from master to a new branch called main.
git add .
The locale directory is uploaded to the Github server.
git commit -m "your commit message"
git push --set-upstream origin main
After the commit has been created, the remote repo can be updated on GitHub. When uploading for the first time ("push"), you have to specify which branch should be the default for pushes. In our case, this should again be the master branch in the "origin" repo