Attack the Players' STRENGTHS, not their Weaknesses
I love making combat encounters. I have a lot of advice on how to make them, but there's one point that I come back to more than any other:
Attack the players' STRENGTHS, not their weaknesses
If you have a fire-focused wizard in the party, don't throw a fire elemental at them. Throw a swarm of treefolk at the party instead, a terrifying encounter that the party can only overcome because of their wizard. Give the wizard a chance to shine, fireballing swarms of enemies that take double damage from fire.
Which encounter do you think they'll enjoy more? Fighting the fire elemental, or fighting the treefolk swarm?
So often DMs ask forums for help figuring out how to negate their players' coolest abilities, ways to stop the players from playing their characters the way they envisioned them. They try to disable or negate the players' cool feats, builds, or strategies. If a ranger has a favored enemy that gets them a bonus when attacking orcs, don't take orcs out of your campaign. Add more orcs. Make a major boss an orc! Stack the deck against the players, but give them chances to shine with their special abilities.
There's psychology underlying this. On a player's turn in combat, they're looking for opportunities to do something cool and useful. If they can't find something that seems valuable, they get frustrated. If they see a perfect opportunity to use a key spell or class feature to huge effect, they've found what they're looking for. This makes them satisfied and happy, it gives them a chance to shine.
If your paladin is immune to charm, throw an enchanter at the party that attempts to charm everyone - so the Paladin gets to feel good about their immunity. If your acrobatic rogue can do massive burst damage, let them know that if someone risks climbing onto the monster's back they could get automatic critical hits stabbing it in the back of the head.
Give your players opportunities to shine, and cool stuff to do that's way better than normal. Give them chandeliers to drop on enemies, give the clerics undead to turn, and give them foes that take triple damage from their favorite damage types.
Then mix it up with a foe that has some resistances or immunities to all their favorite toys, just in very small doses. The one time that Sleep magic shows up in a campaign shouldn't also be a special magic that also affects the warforged (which are normally immune to sleep spells).
Attack the players' strengths, not their weaknesses.
EDIT - Since people seem to like this advice, I do a podcast called The GM's Guide too. #shamelessplug