I like and use puzzles and riddles in games. And I never let an ability check solve them. But I don’t let them bottle neck the adventure (unless the players just refuse to move on). For example solving the puzzle or riddle give something like a shorter time at through the dungeon or reveals a hidden room or chamber where there is something that may help the adventure later on. If they don’t get it then keep going the long time way. The solving of a riddle or puzzle may lead to another adventure in the sandbox. That’s my use for them. The thing I always include is to not let them bottleneck them adventure.