Cannot push to GitHub Repo on my new MacBook?

Earlier I used windows laptop with Obsidian and Git plugin. I used to push and it used to save it to the GitHub repo. But now I cannot push. It asks for username and password which I duly give but then it says that it cannot push. I can commit but cannot push it to repo via obsidian. I have to use Github for Mac to manually push each time. There seems to be sort of Authentication issue. (but this sees to work fine on my old windows pc)

Can I just one click commit& sync to sync my notes to my GitHub repo ?

Solved it myself. I had to generate a PAT (personal access token) and enter it white it prompts for password instead of my login password.