Condition based on parent and child categories

Hi community,

How can we display elements in the product archive only in the parent category? While not displaying them for child categories? Thank you in advance.