Welcome to the forums, newcomer!
We're going to need more information. Please include/list your specs like so:
CPU:
Motherboard:
Ram:
SSD/HDD:
GPU:
PSU:
OS:
It could be a PSU issue or the motherboard's USB ports giving out or the drivers being corrupt or the OS playing tricks. We will need to work out way through the (possible)issues to find the culprit.