Check if they are in trash folder.
Also, try open My Files app → click 3 dots on top right → Trash
Check the trash there.
Sorry to know about your missing Photos and Videos.
If your photos are visible in My Files but are not in the Gallery app, these files may be set as hidden. This prevents Gallery and other apps from scanning for media. To solve this, you can change the option for showing hidden files. If you still cannot find a missing image, you can check the Trash folders and synced data.
Turn on Show hidden system files: Navigate to Apps, and then tap My Files. You may need to open the Samsung folder to find My Files. Tap More options (the three vertical dots), and then tap Settings >> Tap the switch next to Show hidden system files, and then tap Back to return to the file list. Hidden files will now appear.
Check the Trash in My Files and Gallery: Next, you can check the Trash in both My Files and the Gallery app.
My Files: Navigate to and open My Files, then tap More options (the three vertical dots), and then tap Trash. Navigate to and touch and hold the missing file. Then, tap Restore.
Gallery: Navigate to and open the Gallery app, then tap More options (the three vertical dots), and then tap Trash. To restore an image, tap Edit, and then select your image. Tap Restore.
Note: If you have sent an image to the Trash in the Gallery app, it will be permanently deleted after 30 days.
Check synced files: If an image was previously synced or backed up, it may not show up in the Gallery app. If you are using Samsung Cloud, you can view your synced images from your device.
From Settings, tap Accounts and backup, and then tap Backup and restore. Tap Restore data, select your desired device, and then select the content you want to restore. Next, tap Restore. If needed, follow the on-screen instructions to download your backup data.