There are a couple of things that you can do to fix this. Here are the basic steps that I would take on needed cases:
Ditching Input plist Files:
- From the Mac OS Finder, hit Command+Shift+G to bring up “Go To Folder”
- Enter the following path: ~/Library/Preferences/ and choose Go
Locate the following files manually, or use the Search box in the upper right corner and narrow down for ‘driver’ to find them – remove the ones that are relevant to your issue:
com.apple.driver.AppleBluetoothMultitouch.trackpad.plist - Magic Trackpad
com.apple.driver.AppleBluetoothMultitouch.mouse.plist - Magic Mouse
com.apple.driver.AppleHIDMouse.plist - wired USB mouse
Drag the appropriate files* to the desktop to make a backup of them, or just delete the files* if you’re comfortable with that
Leave the User Preferences folder and reboot the Mac
*Note: You can get more specific if you want like only deleting the AppleHIDMouse.plist file if you are only using a USB mouse, or only removing BlueToothMultitouch.mouse if you only use a Magic Mouse, or you can ditch all of the plist files if you’re using all of them.
If the above-listed solution didn’t help, then
Reset NVRAM or PRAM on your Mac
Shut down your Mac, then turn it on and immediately press and hold these four keys together: Option, Command, P, and R. You can release the keys after about 20 seconds, during which your Mac might appear to restart.
Test after this.
If this doesn't help then at last try to:
Reset the SMC on Mac
First, shut down your Mac and Press Shift-Control-Option on the left side of the built-in keyboard, then press the power button at the same time. Hold these keys and the power button for 10 seconds. Release all keys. And, Press the power button again to turn on your Mac.
Start up in safe mode
Start or restart your Mac, then immediately press and hold the Shift key. The Apple logo appears on your display.
Release the Shift key when you see the login window. If your startup disk is encrypted with FileVault, you might be asked to log in twice: once to unlock the startup disk, and again to log in to the Finder.
To leave safe mode, restart your Mac without pressing any keys during startup.