That is not harassment if your community CC&Rs sate that your trash cans cannot be out over night. Your CC&Rs most likely state that all members of the community are required or expected to report any violation. Thus, if the trash cans being left out is a violation, your neighbor is only being a good member of the community by reporting the violation.
Harassment is when someone will not leave you alone and is causing you greif in some way. If they are talking bad about you or saying bad things to you that is harassment. Some people even call the cops on you for no reason. Sometimes you might even have to take legal action against the harasser.
My neighbors are harrasing me by sending multiple letters of supposed covenant violations to my HOA. Then I have to squirm and try to figure out what I need to fix or repair. THey have been doing this over 5 years now/ He takes pictures of my trash can if it is out overnight.