Hello, I’m sorry to hear that you are having this issue. This does occasionally happen when using Pencil2D unfortunately. The Pencil2D Project File Corruption Prevention / Partial Recovery Guide details a couple ways you may be able to recover some or all of your project.
For future projects, we strongly recommend you make backups of your project to prevent loosing work if this does happen again. Occasionally copying the project file, or using Save As and saving with a different file name are the simplest approaches to backing up a project.