Ride faster, then the snakes won’t have time to bite your tyres…. or somesuch.
I tend to mince around trails on my HT (out of the saddle on roots, rocks etc), and have my tyres pumped up to ‘not much give when I shove my thumb in the sidewall’ and haven’t had a puncture for a looong time*. Since I switched from Fire XC Pro tyres, which ripped the valves off my inner tubes, a couple of years ago, I think I’ve had one or two punctures, tops.
On t’other hand, my regular riding buddy stays in the saddle for all gnarly stuff and runs his tyres pretty low pressure (and has some fairly chunky Specialized rims) and is forever getting pinchflats.
* touch wood