Not deleted. Commits on a detached HEAD are just not on any branch. reflog remembers every place HEAD has been:
git reflogLook for your commit messages near the top, something like a1b2c3d HEAD@{2}: commit: add reminder email. Then:
git branch rescue a1b2c3d # put a branch on the newest of the two
git switch main
git merge rescueThat warning you skipped actually printed the hash and suggested exactly git branch <name> <hash>. Worth reading next time.