Not sure if it's this, as I don't have a touchpad:
Settings -> KWin scripts -> Karousel -> button with the gear icon -> Behavior tab -> Section named "Touchpad scrolling (Wayland only)" -> Enable or disable the checkbox saying "Enable scrolling with touchbar gestures"