Cerebral/Cerebellar Cortex versus Deep Nuclei
"Cortex" is a more general anatomical term for the outermost layer of a structure. It applies to both the cerebral and cerebellar cortex gray matter, as these are gray matter structures on the outsides of their respective parts of the brain.

Nucleus is also a more general term; in the context of neuroanatomy, it refers to a cluster of cell bodies. Typically we refer to CNS clusters of cell bodies as nuclei, and in the periphery they are called ganglia, though there are some odd exceptions like the basal ganglia (you referred to the basal nuclei in a comment, which are the same structure, but are almost always called the basal ganglia, whether or not that term is the 'best' term).

White matter, in general, is nervous tissue that appears white because it is primarily "fatty" from the lipid bilayer of cell membranes and consisting of processes like axons (especially myelinated ones) and dendrites rather than cell bodies.

I'm not aware of anyone who would call the cerebral cortex (or cerebellar cortex) a "nucleus": these areas are not shaped as clusters of cell bodies, they are shaped as sheets. The distinction is really only an anatomical one, so it makes little sense to use "nucleus" in a more general term to mean "nervous tissue consisting of cell bodies": we already have a term for that, "gray matter," and in most cases interesting to science we are talking about something more specific anyways.

I'd further say that these distinctions are really only gross anatomical ones, as one can have cell bodies outside white matter, and areas of gray matter like neocortex also include a mostly-white layer of axons and dendrites in "layer 1" but we still treat this as gray matter with respect to the whole brain.

Ultimately it doesn't matter: don't take anatomical terms more seriously than the things they are describing.