Check your Google Drive - maybe you have a backup there. Similarly, check Smart Switch for backup.
If you use Google Photos App, then check the trash section of the app.
If you do not have any backup, anywhere else, then in such condition, you must try third-party data recovery sofwtare.
Check this post for the better solutions - [link|https://www.recover-android-data.com/samsung-galaxy-s21-s21-plus-s21-ultra-data-recovery|Recover Deleted Data From Samsung Galaxy S21/S21 Plus/S21 Ultra|new_window=true]