The best way is to totally avoid contact with other human beings. Do not go where they were, either.
I’ve read about people shipwrecked by themselves for decades on a desert island. Never got a cold there, ever!
That certainly sounds like a plan...