Misleading comment.
From https://onlinelibrary.wiley.com/doi/10.1002/ijc.35463
> Cutaneous melanoma (CM) accounted for around 331,700 cancer cases globally in 2022
> An estimated 267,353 (95% uncertainty intervals [UI]: 242,818, 278,638) CM cases were UVR attributable globally in 2022
UVR = Ultraviolet radiation
Cutaneous melanoma (CM) is the vast majority of melanoma cases in the US at least:
> The percentages of melanomas that were cutaneous, ocular, mucosal, and unknown primaries were 91.2%, 5.2%, 1.3%, and 2.2%, from https://pubmed.ncbi.nlm.nih.gov/9781962/
tl;dr ~80% of Cutaneous melanoma cases are attributable to UV exposure.
Please be careful and charitable in reading others' words, especially as they relate to scientific topics.
OP did not say that melanoma has no sun exposure risk but that it is lower than the risks associated with other cutaneous cancers (e.g., SCC and BCC) and it would seem that's true based on the very short search I performed.
https://pmc.ncbi.nlm.nih.gov/articles/PMC5742376/