When the Generic SSD drive keeps disconnecting while installing macOS or backing up with Time Machine, you can't continue the operation smoothly and successfully. What's more, the sudden disconnection may damage the external drive and cause data loss.
Have you backed up the drive before? If not, you'd better recover data from the drive that keeps disconnecting as soon as possible. You can try iBoysoft Data Recovery for Mac, professional third-party data recovery software to scan the Generic SSD for lost and deleted files and save them to a different drive.
When you encounter an external hard drive keeps disconnecting issue on the Mac, all the involved components could be the culprit, including the Mac, the connection, and the drive. You can troubleshoot the issue from these three aspects.
First, check the connection. A stable connection is a must to use the external hard drive on a Mac, make sure the USB cable, USB port, and USB hub are not defective. Or, connect the drive to another computer to see whether the issue remains.
Secondly, eliminate the OS errors. You can try to restart the Mac, boot into Safe Mode, disable the 'Put hard disks to sleep when possible' option, change the default disk sleep time to maximum, and update/downgrade macOS.
Thirdly, the problem may be with the external hard drive. Try to run First Aid to check and repair the disk. If it doesn't work, reformat the drive to remove all disk errors.