trackpad mouse or external?
You can narrow down the issue— To trouble shoot further you can:
Try a SafeBoot https://support.apple.com/en-us/HT201262
Takes noticeable longer to get to the login screen, does a 5-15 minute disk repair before it fully boots up, and certain system caches get cleared and rebuilt, including dynamic loader cache, etc. Login and test. Reboot and test will take a little longer as caches get rebuilt. Log-in and test.
This test will tell you if third party interference; extensions etc are not loaded in safe boot mode.
Test issue in another user (or guest user) account https://support.apple.com/en-us/HT204443
This will tell you if it a universal issue or isolated to your user/admin account.