One of the common things you see GMs talk about online when preparing encounters for their players is taking their PC's abilities into account. Often this is strung around the conversation "how do I stop my players from just crushing this encounter", and that is perfectly fine. On occasion it is a good idea to minimize or limit the usefulness of key abilities a PC has in order to challenge them. You don't want to do it too often - because they should get to benefit from their hard earned abilities - but you now and then? Sure.
However, more often than I try to eliminate abilities I like to emphasize them. Keep abilities in mind when designing an encounter not to make things harder for the PCs, but to showcase just how cool one ability a PC has can be - and by extension, how cool that PC is.
For example, in one of my games a player is running a Paladin and they acquired a dragon slayer great sword. The weapon does bonus damage whenever it hits a dragon. Another ability a paladin has is Divine Smite which does even more damage when it hits an Undead. So what happens when you put an Undead Dragon in front of this Paladin?
Quite simply, he gets an opportunity to look like a total bad ass.
Now does the player take that chance? That is up to them. Maybe they see it. Maybe they don't. Maybe the encounter plays out in such a way that they never get the chance. That could happen, and because of that you don't hang the encounter on that moment you just make it possible.
Outside of combat this can be a lot better. Chances to solve RP problems, or to get leads on mysteries that are going on. They don't have to bite. They don't have to take the opportunity. But if they do? it gets to highlight parts of the characters you don't normally see.
And that can make the game better for everyone.
Give it a shot.