Sucking on your thumb is normal as a child as you usually apply some pressure on your lips and they have erogenous zones, giving you a nice sensation.
I used to do the same when I was younger myself and up to quite old (about 7 or perhaps even but I don’t recall doing it publicly.
I don’t remember exactly how I stopped but I have always had a very strong mind. Anything can be done if you have the right mindset; just focus on not doing it and maybe put some kind of lipstick to notice the action more.
Good luck!