Do you have the same issue when clicking on items on the menubar? If so, then your Trackpad may have a hardware issue.
Try booting into Safe Mode to see if you have the same issue. If things works while booted into Safe Mode, then it is likely you have some third party software installed which is interfering with the normal operation of macOS.
You can also try creating a new macOS user account. Log out of your main user account, then log into the new macOS user account to see if you have the same issue. If the new user account works fine, then you have some sort of issue with the main user account.
Try using an external USB mouse. Do you have the same issue? If not, then the laptop's built-in Trackpad either has a configuration issue or the built-in trackpad is bad (or maybe if an older laptop with a mechanical trackpad, there is some liquid or crumbs preventing the Trackpad from physically moving properly).