Compliments are good. You probably don’t give as many compliments as you could. You don’t receive as many as would be best, either. You can change both of these, and you probably should.
Good compliments make the world a better place. They improve relationships, build confidence, and they make appreciation conscious and visible. A well-given compliment will make the other person feel better, and yourself too. Seeing another person light up because of something you said is a great feeling.
Side note: Compliments are also, like most positive expressions of emotions, feminine-coded in our current society. That sucks if society sees you as a man. My best advice is to disregard the expectations you’ve been taught – it’s good training for other times you want to break with society’s severely limited defaults. Usually, feminine-coded behaviour in men is associated with being queer and/or weak – you know you’re not the latter, and the former isn’t a bad thing. Just be aware of the unwritten rules you choose to break, and you’ll be fine.
How do you compliment somebody? First off, focus on yourself. A compliment is about something that you genuinely find positive. Nobody wants a fake compliment. So pay attention to your thoughts and emotions, and figure out which things stands out as positive about the other person, and that you genuinely enjoy.
Once you know what you could compliment, focus on the other person. Complimenting somebody is above all things meant to be a positive experience for the person you’re complimenting. Compliments should generally be for things the other person has influence over, and should be specific enough to show that you are serious and have put thought into it. A counter-example meeting none of these requirements would be “Wow, you’re so beautiful”. Instead, focus on things they did, like skills they worked for, things they created, actions that resonate with you.
Finally, focus on the circumstances. Different compliments are appropriate in different circumstances. I can compliment a friend in private much more intimately than a stranger in public. Make sure you’re not overstepping, and give a bit of thought to your wording. You’re not here to pass judgement on them or their work, but to communicate your reaction or your impression. “This is a really good painting” is different from “This painting resonates with me because …”.
Many people have a hard time dealing with compliments. That’s fairly normal and you should be prepared for it. Maybe you misjudged the situation, or maybe they just don’t know how to respond. In any case: Don’t press the point, and for heaven’s sake don’t expect or even insist on thanks. Don’t try a second time, and instead step back gracefully. With friends, maybe ask them if they’d generally prefer not to be complimented. Discomfort at a compliment is not worth the positive message.
Generally though, try to give more compliments. If that seems hard, focus on finding compliments without actually giving them to the other person. It’s a good first step and builds appreciation. People will notice when you work on appreciating them, even if you don’t compliment them directly. And by normalising appreciation and compliments in your groups and your friendships, you’re bound to receive some yourself. (Remember to say “thanks”).