Key

Keys were a joke item from Java Edition 3D Shareware v1.34. There are three different keys: red, yellow, and blue.

Barrels
Red keys can be found inside barrels that naturally generate throughout the world.

Mob drops
The red key was dropped by the wither, the yellow key was dropped by ravagers, and the blue key was dropped by the elder guardian.