Hand sanitizer is a great second option but washing hands with soap is the gold standard and make sure if you are using hand sanitizer, that the alcohol content is between 60-70%.
Hand washing works because the bubbles pull thing off the skin.
Use warm water—not super hot because that will dry out your skin leaving cracks for bacteria (good and bad) to seep in.
Then finish off with a clean towel or paper towel.