Trying to be nice to someone can end up hurting them. Not all compliments are well received, and there are good reasons for that.
When I was a child I remember people complimenting me on my eyes, but I can't remember anyone complimenting me on other things that weren't related to my appearance. What I learned from that experience is that our looks matter.
I also remember people talking about my hair, my eating habits, whether I'd lost weight and looked better, but I can't remember someone saying that I was a good illustrator, writer, or anything else not related to my body.
Don't compliment someone on the way they look
As a result, I grew up being very self-conscious about my body and I seldom focused on my personality traits that could be appealing to others.
It took me a lot of therapy to learn to appreciate myself for the way I am, not the way I look, and I wouldn't want anyone else to repeat these patterns with other children.
So if you want to say something nice to a person you like, just don't center your compliments around looks. It is important to build a person's self-confidence around aspects that are not subjective, temporary, and arbitrary like beauty standards.
Looking young, looking slim, and having nice hair are not good reasons to complement.
The kind of compliments you can pay
Remarks that complement creativity, passions, your energy, and how a person makes you feel, are the kind of compliments that build strong and self-confident people.
Saying "I loved your work," "you have a positive energy," "I admire your personality," and "you make me feel happy," focus on the energy and the joy this person brings to your life, and this is much more powerful and permanent than saying "Have you lost weight? You look great."
The bottom line
Never compliment someone on aspects that can fade, beauty is subjective, youth is not eternal, don't repeat dangerous and harmful patterns that only stereotype beauty and leave most of us out of the standard.