Please detach all devices connected to USB ports including drives.
Use the computer for as long as possible to confirm that the problem is related to an attached USB device.
The longer the testing time period the better the testing environment.
Use the reliability monitor to monitor computer stability / instability.
https://www.howtogeek.com/166911/reliability-monitor-is-the-best-windows-troubleshooting-tool-you-arent-using/
.
.
.
.
.
Please remember to vote and to mark the replies as answers if they help.
On the bottom of each post there is:
Propose as answer = answered the question
On the left side of each post: Vote = a helpful post
.
.
.
.
.