Retrieving the entire project from the Source Control Graph section

I was designing a project as Vibe Code, but because I had very little knowledge, I never used commit. After a while, my code became a mess, and I want to revert to an earlier version. After some tinkering, I saw that the source control and the graph section below it were related to commit. I want to restore all the project files to a state from about 5 days ago. Is it possible to do this, how do I do it, or is it completely ruined and I need to start over? I want to restore the project the “I have a layout…..” part on the graph section with all project files the last working version.