Hand sanitizers can be helpful, but the CDC recommends using them only when handwashing and drying are not available. This is due to hand sanitizers not killing all kinds of germs and only working best in ideal conditions (i.e., when hands are visibly clean; most hand sanitizers won’t cut through visible dirt or grime).
If you do not have access to clean running water and soap, reach for a hand sanitizer that’s at least 60% alcohol and rub hands vigorously until dry.