Here is what I did to get my Veiled Chameleon to eat worms. (Don't use mealworms, thay can cause compaction and they are not nutritious)
I took a red solo cup, and cut the bottom off, and use the bottom. I left a lip about 1/2 an inch high.
I put the Phoenix worm(s) in this, and held the holder up so he could see them squirming. He now RUNS to the door when he sees me carrying the worm holder

They need to see them moving to get interest.
I tried tricking him into thinking pear and apple pieces were worms, but he doesn't fall for that, he has even tried to tongue snipe my finger instead of the fruit pieces, which I find funny. He will eventually eat the fruit pieces though

Some worms you can get to squirm faster by letting them warm up.