It’s very simple. I use small flat containers (I mostly reuse small containers from Costco bought foods like hummus, guacamole, etc.). Just fill the container with cheap vegetable oil and put it under the plant. Earwigs are attracted to the oil and drown in it. After the container is filled with dead earwigs, empty it into garbage or compost and refill with fresh oil. I try to put the container so its edge touches the trunk to make it easier for earwigs to get in. Most containers I use are plastic, so I try to put them in shade, otherwise they will be baked by the summer sun.