I would advise using:
git pull --rebase
The GitHub repo has seen new commits pushed to it while you were working locally.
Here is the full syntax:
git pull --rebase origin main
git push origin main
After that use, a simple git pull would do the job. In this way, you can replay (the --rebase part) your local commits on top of the newly updated origin/main (or origin/yourbranch: git pull origin yourBranch).
Note: git reset --mixed origin/main can also be written git reset origin/main, since the --mixed option is the default one when using git reset.
I hope this helps.