Hi! Welcome!
This problem has been reported before by several people (here’s the most recent one, with links in my reply there to others: When i launch rstudio I get prompted for a download file? anaconda install). So far, people have been able to resolve it by reinstalling the RStudio IDE directly from RStudio.
I’m sorry you have lost work due to this problem! I don’t know if it’s possible to recover it, but I’m a little unclear on what happened: what kind of file got overwritten? Was it a .Rproj file, or a .R file, or something else? What directory was the file in?
You should know that apparently installing RStudio via Anaconda is not officially supported, so in the future it’s probably safer to install directly from RStudio downloads.