Maybe these links will help you!
earthworms
https://www.chameleonforums.com/red-wigglers-24759/
https://www.chameleonforums.com/can-chameleons-eat-redworms-9086/
https://www.chameleonforums.com/does-anyone-feed-earthworms-323/
https://www.chameleonforums.com/earthworms-grubs-ok-6978/
If you're feeding earthworms you find around the house or neighborhood, keep in mind they are probably filled with fertilizers, pesticides, and hormones used in gardens and lawns. They may also be filled with parasites. Knowing all this, I still feed one or two to my chams every 3 months or so if they'll take them. Most chams will recognize them as food if the worm wriggles around enough.
I also routinely and carefully treat my chams for parasites with a gentle/natural treatment about once a year. I only do this because I feed wild bugs to my chameleons. This is only my opinion and you may or may not agree with what works for me and my chams. I hope this helps!