What is a riddle and how long ago did it appear?

A riddle is an intricate description of an object in which its main properties are emphasized, composed to test the ingenuity of man. The riddle is a folklore genre, which involves an allegorical description of an object or phenomenon, either colloquially or in verse.

The word "riddle" is of ancient origin. In Old Russian, the word "guess" meant "to think," "to ponder. Riddles were common in Russia in ancient times. When the business year was over, the harvest in the fields and orchards was gathered, nature fell asleep, the powers of nature quieted, people could have fun, relaxed from their labors, and then the feasts of riddles were organized.

In riddles, Russian people created a poetic image of his surroundings: objects, phenomena, people, animals, etc. Unlike other genres, the riddle poetizes concrete, the most ordinary, but close and necessary to the person things of the real reality. The majority of riddles are based on metaphor, i.e. transfer of meaning by similarity. People choose the object of comparison and likeness from their environment, which is close to their everyday life and meets their artistic and poetic tastes. The subject of the first riddles is a man, his body parts and functions, clothes, followed by riddles about the house and the objects that are in it, later the subject of the riddles became a yard, vegetable garden, orchard, apiary, fields, forests, and all this ends with the phenomena of nature.

Examples of riddles with answers are given at the link.  https://riddlesbest.com/category/short-riddles/