usually a bit of old tyre or Park do plastic patches (but a but of old washing up bottle works as well).
Basically if you cut your sidewall, and you get the black balloon of inner tube poking out, you let the tyre down (if it hasn’t popped), unseat the tyre and use this bit of plastic between the inner tube and the tyre so it covers the cut, re-inflate the tube so it pins it in place and you can keep on riding as the inner tube won’t be able to push its way through the tyre carcass.
I can confirm that nutrigrain bars work well, as on the last Dyfi I had 3 of them in my rear tyre all ozing jammy goodness out 😉 In hindsight the Specialized tyre I was running (a low profile, low rolling resistance racing one) wasn’t the best choice