> just tell the person
Sure, that always works fine. They won't take offense or make it a thing or blow it up and make everything awkward from then after.
Of course, I'm being sarcastic. It's usually easier to just eat the discomfort and not make a fuss. But, it would be nicer to not get touched by randos in the first place.