The best advice I ever got was this: if a compliment about someone pops into your head, you should tell them.
Like I have to add the caveat don't be a creepy fuck (unless you know them and they like that) because there's 8 billions of us and that means there are folk who are super creepy just by law of large populations. I'm talking about real compliments, not preludes to flirts or slaps.