That's in macOS System Preferences. I use it all the time. Go to Trackpad / More Gestures and check "Swipe between pages". You can also control how many fingers you want to use. I set it to three fingers so that it doesn't conflict with horizontal scrolling.
https://wiki.archlinux.org/index.php/Touchpad_Synaptics#Fire...