When I am developing a project and making some big changes, I like to create a second version of my project and work on that. After doing this yesterday, I lost a lot of new work and want to check whether the way I create my new version has flaws. I had my project in a folder in a Microsoft OneDrive folder:
C:\Users\MyName\OneDrive\Documents\Visual Studio 2022\BankSim02
I copied this whole folder into
C:\Users\MyName\OneDrive\Documents\Visual Studio 2022\BankSim03

Are there better ways of creating versions of programs