Update the user or the repo URL (depends what you really want to change) in you project by entering the .git folder (in your project) and modifying the "config" file respectively.
When using azure devops I needed to change the repo url which contained the token I had to change ;-)
I had faced similar challenge with changing my user, when I was pushing files directly from IntelliJ Idea and though the files were updated in GitHub it was being updated from a different account.
Turns out there's a file called .gitconfig in windows where the user name and email is stored.
C:\Users\<USER_DIR>\.gitconfig
[user]
name = <USERNAME>
email = <EMAIL>
If you are on a Windows machine and git is using the Windows credential manager, then you can change the username and password in the credentials manager:
To check if git is using the windows credential manager: