Why would Unity save over my project before closing when I clicked "Do Not Save"?

I broke my project file, so I closed it in order to re-open it. I clicked “do not save” before closing. Yet, when I go to the hub, it presents me with a saved-over, broken version of my project. I did not save at all, and did not build and run. There should have been no way for Unity to have saved over my project. I also do not have version control set up, so I can’t revert back. I’m confused on how to avoid this in the future, if Unity is just saving over projects without my knowing. Has anyone else encountered this?

“Your project” is not a single thing. Certain changes are immediately saved. Scenes are saved whenever you save the scene or change the scene. Scripts are edited outside of Unity and are saved when you save them in your editor. You should never ever in any program rely on “undo” or “do not save” mechanics. If you work on an important project, you should use source control or at least backups.