Hi Waed,
Thank you for reaching out. My name is Leo, a user just like you. I'd be happy to help you with your concern.
May I know what changes were made that might be causing the issue? May I also know if you saved the file through a cloud storage or OneDrive? If yes, you can try to recover it via OneDrive history so that you will be able to restore the version of the file. If not, use the Time Machine feature on Mac to recover. With many apps, you can go to File > Revert To > Browse All Versions to view previous versions of documents in Time Machine, then find and restore the version you want. In case the issue still persists, please don't hesitate to let us know. We, the community users, are always here to help. Thank you!
I pulled the above steps from Official Apple Support website. For reference, here's the link below:
https://support.apple.com/guide/mac-help/mh11422/mac
Your understanding and patience will be highly appreciated. I hope I provided a helpful information regarding your concern! Let me know if you have any further questions. Be safe always!
Best Regards,
Leo