Chameleons are naturally defensive of their territory. However most of the time this is just a show. You can train your chameleon to be comfortable with you and your hands. There are a lot of opinions about this, but basically this means positive reinforcement like bringing treats, special bugs, and taking them to climb on something special. Also you want to avoid enforcing negative behaviors so if you reach in and if he starts to hiss and show defensiveness, don’t run away or he will feel successful and repeat these behaviors. Let him get all mad but stay still and stay there until he relaxes a little and then keep on moving in. Usually if he tries to bite you he will really just head butt you and even if he does bite, it won’t hurt much or do any real damage. You can encourage him onto your hand with some gentle touching/poking of his hind legs and tail, which he will not like much and will naturally climb onto your other hand to escape from. Do not wrap your hands around him and pull him from the branch of course, he needs to walk onto you and trust it’s okay to do that without pain or injury. Once you remove him from his territory he should calm down as you continue to move slow.
Try to keep each interaction positive and rewarding for him. Move slow, things moving fast in his natural environment are usually predators. and just know that he won’t like his hind legs or tail touched and he probably won’t like you touching him at all with your fingers for a while until he trusts you. Most chameleons seem to want to be picked up because they know it means they get to go hang out on their favorite tree or walk around in the sunlight. These kind of positive rewards helps the chameleon associate you with happy things. Every chameleon has a different personality and chameleons have moods too so it’s important to understand this as it can also help you know when something is really wrong. Grumpy can mean sick.