I'm confused what I should pull
Nothing. The "hint" doesn't actually apply here.
The issue is that Git doesn't "know" that the commit you currently have is an amended version of the commit already on GitHub (i.e. it doesn't keep track of such things). As far as it cares, amended commits are just entirely different commits. So you can have several practically opposite situations which lead to the same result, and Git can't tell the difference between them:
The advice to pull (either merge or rebase) applies when the remote repository has commits you want to incorporate, usually because someone else pushed their own commits (said 'someone else' could also be yourself when you work on the same project from more than one computer).
Your situation is actually the opposite – you don't want to pull the commit that GitHub has, because that's just the old version of the commit you just amended, and you want to simply discard it and push the new version over it using push --force.
Finally, if this were a multi-user repository and you successfully pushed the amended commit and then another developer tried to push their commits, they'd be getting this error message as well. In that case they wouldn't want to discard your new version, but wouldn't want merge both old and new versions either – they would have either to rebase (to discard the old version from their local repository) or manually re-do their work.
For Git, all three look like the same thing – repositories are diverging – and it just always shows a hint for the 1st situation, whether it applies or not. (It can lead to some mess but it doesn't lead to losing commits, so it's the "safe default" advice.)
In general, a good first step would be git fetch those commits (just download without merging), then take a look at the "new" commits on remote using git log "..@{upstream}" (or git log main..origin/main) – maybe tig "..@{upstream}" for a more visual overview – then decide whether you want to pull them in (merge, rebase) or force the push anyway.
If you wanted to keep those commits, you could git pull or git pull --rebase to bring them in, then make sure the results are tidy (no merge conflicts and such), and finally push as usual.
Since this is a 1-user repository and you already know that GitHub has nothing more but the old commit that you've later amended, you can skip checking and go straight for git push --force to discard the old commit and push the new version over it.
(With a single-developer, single-user repository you can do whatever you like, as there's nobody else who would mind. But on a repository used by multiple people, force pushing is generally very rare as it creates similar troubles for everyone else, and in the rare situations, push --force-with-lease should be used. This goes even for repositories that other people are merely using, even if they're not pushing their own commits – please do not make a habit of amending or rebasing your own commits that other people have already pulled.)
from which repository
'Pull' implies downloading commits from some other repository, and right now there's only one "other" repository involved (besides the local one), i.e. the repo on GitHub.