For Firefox specifically, assuming you’re using Wayland, try disabling
mousewheel.system_scroll_override.enabledandapz.gtk.kinetic_scroll.enabledin about:config and see how that feels.
This fixed it for me. I was getting insane scroll speeds in Firefox on Ubuntu 21.04