I don’t. Mostly I would just leave them alone in most cases. Especially in “semi-private” situations like if they are sitting down to dinner at a restaurant or doing something specific. I don’t want to bother their life.
If I can’t hold myself, and the situation makes sense like we are just standing there waiting for a flight or something else not private or active… I might say “Hey, love your work! Just wanted to say hi!” and I’d leave it to the celeb. If they respond nicely but short, I leave it there, let them be. If they engage me, I’ll chat with them for a bit. But let them off the hook as soon as they indicate they need to move on or stop.
They are just people, and I don’t know them. So I’m not going to expect anything more from them. It must be exhausting to deal with fans going over the top.