Hi, I am very sorry to hear of your pictures disappearing from Gallery. Just to clarify, have you checked to see if they are automatically backed up to something like Google Drive or One Drive? Also make sure to look around any other photo apps, like Google Photos for them.
You can also try clearing the cache and data on the Camera and Gallery apps with these steps: https://www.samsung.com/us/support/answer/ANS00077611/
Finally, see if a third-party application may be the cause. The guide for Safe Mode: https://www.samsung.com/us/support/answer/ANS00062983/
Please let me know if this helps.
do you use SD card??
share the device model number and the software version please.
I suggest you submit error report to Samsung Members after you notice the issue again, and in the mean time... frequently save the pictures to either OneDrive or Google Drive.