Have you replaced with brand new alkaline batteries?
If it uses a USB dongle: Try a different USB port
If it’s Bluetooth:
Remove the mouse from Bluetooth settings and pair it again.
Turn Bluetooth off/on your device.
If it still fails → it’s not worth repairing; replacing the mouse is the practical fix.