If it is sap-based, the solution described here may work. (Generous amount of alcohol-based hand sanitizer, scrub, rinse with water, repeat.)
If it's something else, like chewing gum or spirit gum, you may need to try other solvents that are safe to use on skin. One popular method is to work peanut butter or olive oil into the gum with a toothbrush, wait a few minutes for it to work, then remove it. Depending on the type of chewing gum it could either soften or harden/granulate the gum, but it should make it less sticky. The oil is also nice for the skin, helps it tolerate more scrubbing without getting chapped or scratched up. You could even use a good hand lotion if you prefer, to work on softening and scrubbing off the gum before washing with soap and water.
Here's one article on using these materials to remove gum from hair: https://www.aad.org/media/news-releases/b543a600-5...
Another source recommends vinegar as a possible antidote to chewing gum.
I have been able to avoid most types of goop besides tree sap for a long time, due to my lifestyle, so this advice is second-hand.