Have you tried restaring your Mac?
Either the webpage is glitching or your Mac’s input settings are tripping up. First thing I’d try is testing in a different browser or app, if it only happens in Safari or Chrome, clearing cache or updating the browser usually fixes it.
If it’s system-wide, restart your Mac and check System Settings > Trackpad/Keyboard > Scroll & Gestures to make sure nothing got toggled off. Also try booting into Safe Mode to rule out third-party extensions. Nine times out of ten, it’s either a browser bug or a stuck background process, not actual hardware.