I once had a commercial line follower robot kit called a Movit. It's schematic was surprisingly simple.
Two photosensors side by side, looking down at the line. Very close.
An op amp compares their volt levels.
If the right side gets darker (robot wandering to the left), the op amp turns on the left drive motor. And vice versa.
Maybe it had two op amps.
There was no equilibrium mode where equal light on the sensors made both motors drive straight. In that case only one motor was driving, a kind of 'search and acquire' mode.
You can modify performance as you wish. Example, by having both motors on to some degree.