Most children use thumb sucking to calm themselves down and, if possible, the coping mechanism itself needs to be replaced. When the child has reached the age where they can understand why this is a problem, just explain why it is a problem and try to think about it. Help them understand that this can crook their teeth, and use this to recognize that it can have a negative effect.
For children who can't break the thumb sucking habit, dentists can put a device on the roof of their mouth to distract your child from sticking their finger in their mouth. You can have a look at the device for thumb sucking teeth at https://stopthumbsucking.org/community-thumb-sucking-teeth/.
Image Source: Google
Depending on the child, they may only need a device with a metal rod through the roof of the mouth that does not allow soothing suction, which allows them to suck the thumb. On the other hand, there are devices with teeth that "prick" your finger when trying to put it in your mouth.
Children who have teeth that do not contract in the front due to thumb sucking, the brackets are necessary to fix your bite and position it properly. Everything should be assessed on a case-by-case basis and each child is best examined by their dentist for advice and a proper diagnosis.