The most common obstacle pattern in games: something blocks the player’s progress, and something else (found, earned, or activated) removes the block. Doom and Pokémon use literal keys and doors. Portal uses companion cubes and pressure plates. The Last of Us uses generators and dumpsters — keys and doors dressed in narrative clothes.
Sometimes the “key” isn’t an object at all but a new ability the player has gained — Link’s hookshot, Ori’s double jump. The metroidvania genre is essentially keys-and-doors where every key is a verb.