Try using
git push heroku main
instead of
git push heroku master
Reason: Because the default starting branch of git has been changed from master to main, that’s why your git command is not recognizing the master branch and giving you a “ref” error.