Make sure mouse is clean at the bottom.
Try the mouse on different USB port of the computer.
Try the mouse in another computer(if available) to isolate if it is an issue with the computer.
Try a mouse from another computer(if available) to isolate if it is an issue with the mouse.
Also, you may refer to the link mentioned below to troubleshoot mouse issue in Windows:
Thanks & Regards