Hi there! My name is David. It’s a pleasure to help you today.
In this case, according to what you describe, the problem could be due to the USB-connected HDD drive requiring a higher amount of power (voltage/current) to function. Then when other USB devices are connected, they may not be properly powered, which is probably why they keep connecting and disconnecting. It could be a limitation in the power delivery of your laptop’s USB ports when multiple devices that require USB power are connected.
As has already been mentioned, I would also recommend using a USB hub with external power, so you can use several USB devices at the same time.
Let me know if the shared information has been helpful. Regards.