You can cook everything you eat if you want, and it’d probably reduce the number of microbes you get exposed to.
However, you’re going to be foregoing stuff like fresh vegetables. Those are a factor via which disease can and has traveled. But it’s something that I don’t particularly want to give up.
Raw milk is a listeria vector, and some cheeses made from it – especially those imported from Europe – make use of raw milk. That’s probably avoidable.