You are not the first and you will not be the last to face the problem of data loss. This is a very common situation among users and you can encounter them at any time. Therefore, instead of falling into such situations, always make a backup copy of the updated data. You can also use programs that will restore your files. For example, you can find one of the programs on this site https://ditchnet.org/data-recovery/best-free-data-recovery-for-mac/. This article helped me and I think it will help you.