I'd say that this was an example of the ecological fallacy, which occurs when a relationship with a variable at one resolution (typically people) doesn't have the same relationship at another level of resolution (some sort of groups).
A common example cited in the wikipedia article (and there's a whole book about this is that in the US rich people tend to vote Republican, but people in more affluent states vote democrat.
This is often found in epidemiological research. Something that is true at the country level may not be true at the individual level. Countries that eat more sugar have higher levels of certain kinds of cancer, but that doesn't mean that people who eat more sugar are more likely to have cancer. (More affluent countries have higher sugar consumption, and an older population, so they have more cancer.)
Similarly, vaccination against coronavirus decreases your chance of dying of covid-19. Counties with older populations might have more people getting vaccinated (because older people are more concerned about covid) and more deaths due to covid (because people are older), so the relationship is negative at the individual level, and positive at a higher level of aggregation.
Skin cancer is caused (to a large extent) by sun exposure. People who live in countries with a lot of sun are likely to be more aware and more careful about this than people from less sunny countries. The incidence of skin cancer is higher in Norway (age standardized rate: 18.8) and Denmark (age standardized rate 19.2) than Israel (age standardized rate: 11.4) and Italy (age standardized rate 11.4). https://www.ncbi.nlm.nih.gov/books/NBK481862/table/chapter1.t1/