HEIC does not open in most browsers, on many Windows PCs or in a lot of upload forms. ICNS is what macOS expects for app and file icons. HEIC is at home in saving storage on Apple devices; ICNS is the usual choice for macOS application and folder icons. ICNS cannot bring back detail that HEIC compression already removed; it simply stores the result without further loss, in a larger file.
Most browsers other than Safari cannot read HEIC themselves, so a HEIC decoder of under 1 MB is downloaded the first time and kept in the browser cache. The picture is fitted into a square, with empty margins if it is not square, and written at 16, 32, 64, 128, 256 and 512 pixels (and 1024 when the source is at least that large), each as a PNG inside the icon file.