Breakdown of Puer in horto clavem quaerit, sed eam non invenit.
Questions & Answers about Puer in horto clavem quaerit, sed eam non invenit.
Because puer is the subject of the sentence: the person doing the actions (quaerit and invenit). In Latin, the subject is typically in the nominative case.
In horto is a prepositional phrase meaning in the garden. The preposition in (when it means location, not motion) takes the ablative case, so hortus becomes hortō (ablative singular).
Clavem is the direct object of quaerit (he is searching for something). Direct objects are usually in the accusative case. The noun clāvis (key) is 3rd declension, and its accusative singular is clāvem.
Eam means her/it (feminine singular) and refers back to clavem (the key). It is accusative singular feminine, because it is the direct object of (he does not find it).Latin often uses a pronoun like this instead of repeating the noun.