Perhaps, the connection between the external hard drive and your Mac is unstable, the external hard drive is corrupted, or the spotlight index is damaged, all of these issues could cause the files and folders on the external hard drive to disappear from time to time.
Hence, you can troubleshoot the issue from these aspects:
1. Check the connection issue between the external hard drive and your Mac. Make sure all the connection-involved parts are not defective, including the USB ports, USB cable, adapter, etc.
2. Back up the files and folders on the external hard drive when they are available, then run First Aid to check and repair disk errors on Mac.
3. Try third-party data recovery software such as iBoysoft Data Recovery for Mac to scan the external hard drive, it could make all your files and folders visible so that you can recover files disappeared from the external hard drive on Mac.
4. Reformat the external hard drive on the Mac. This will erase all contents, make sure you have backed up the drive or recovered all files from the drive via data recovery software.