IIRC, if a child got yaws in his youth, it was much like chicken pox and he soon got over it - but had lifetime immunity from the deadlier genetic forms.
There’s another viral disease in like the Dominican Republic that has much the same effect.
The classic example, of course, is the vaccinia virius, also known as cowpox. Louis Pasteuur discovered that milkmaids exposed to cowpox were immune to smallpox. So copwpox gave us the first vaccine -- and vaccinius gave us the word vaccine.