I want to include touch inputs to only move right and left

How would I go about having touch inputs that move left and right on touch.

Here’s what it looks like. I only want the chapter to only go to two directions.