My current players like puzzles, so I'll drop some in from time to time. But often several sessions will pass without any. Riddles are far rarer and are likely to only be used once or twice in a campaign. I just don't think there are many good riddles that aren't already well known to people who like riddles.
The type of Puzzles I use are simple things like 3 coin slots in a metal door that require the correct sequence of coins inserted (good for lower levels when every coin counts)
Solution could be something guessable like a gold piece in each slot,
but it can be something very specific, like 2electrum pieces in the first slot, then 1 silver in the 3rd slot followed by 1 platnum in the middle slot. Which is pretty much impossible without adding other options
like maybe there's someone that knows the combination that the players could confront.
Or the sequence can be found somewhere in the dungeon, prompting further exploration.
Or players can make a skill check, if they prefer, with the level of success/failure reflected in the amount of coins it takes to solve.
I once had a pair of wooden block puzzles that are both a challenge to take apart and put back together. One I'd taken apart the other was still unsolved so I treated them as magic items, that when assembled made the person that completed the puzzle immortal. It was a side quest that didn't need to be completed, and it was pretty clear to the players that being immortal probably meant they would be trapped in the cave forever, but they all still tried.
(No one could work it out, they only spent maybe half an hour total. With one player who wasn't really interested in the puzzle explored the caves a little by himself)
Any time i can add a basic puzzle feature, like a statue that activates moving walls that open /block areas during combat the better. I'm always looking for ways to give players things to do during fights.