Materials/shaders can only be assigned to mesh faces, either real mesh objects or procedural meshes created by modifiers like the _Skin_ or _Geometry Nodes_ modifiers etc., or for example curves which get "meshed" by giving them extrusion, bevel or profile and likewise. An exception are also lights, which can have shader nodes for emission. Objects like empties, cameras and armatures cannot have shaders. Anything which disappears when you turn off the _Viewport Overlays_ basically.