I've always (since the age 10) carried flat repair kit with me (pump, means to remove a wheel, tube patches & glue and a spare tube), especially when riding out of town.
It's been used to fix other people's flats 99.9% of the time.
Minding where one rides is the best flat-protection: just avoiding the debris, potholes etc. Usually requires some concentration, actually looking where one is going, planning ahead for traffic...
I do get flats though. After having written this, the probability of that happening today has just risen by 99% - Murphy's law...
"The first rule of flat protection is not talking about not having flats!"