When trying to push to remote in Git, you may encounter the error “Error: src refspec master does not match any”.
> git push heroku master
error: src refspec master does not match any
error: failed to push some refs to 'https://git.heroku.com/salty-eyrie-89059.git'

As one of the most common causes, the first thing you want to check is whether the reference actually exists.
Run git show-ref to list the references.
> git show-ref
e4cd18c39bd6cfc5f6176b5adbe2ae5238d4776f refs/remotes/origin/HEAD
e4cd18c39bd6cfc5f6176b5adbe2ae5238d4776f refs/remotes/origin/main
GitHub recently made a specification change to change the main branch from “master” to “main”. It seems the cause of this error was here.
Change the push destination from master to main and execute again, and it will work.
git push heroku main
(Reference)
Message ‘src refspec master does not match any’ when pushing commits in Git - Stack Overflow