you usually use a chemical attractant insert along with the device. I have one of these. Success seems to be hit or miss. I've run one for a year and it seems to only accidentally catch mosquitos, and that's not a unique outcome. But then others seem to have massive success.
https://www.costco.com/dynatrap-1-acre-insect-and-mosquito-t...
catches moths as well, so it's not as eco friendly.