To help straighten things out:
Components go on GameObjects.
Renderers are Components that render things.
Renderers contain Material references.
Materials are not Components. Materials are Assets.
With those relations in mind, google for how to change materials to get a simple tutorial on all the other issues that vary depending on what you are trying to do.
ALSO, here is more:
Materials materials array of materials renderer:
If you have an object with multiple Materials, that ALSO implies that the mesh has multiple submeshes.
Each Material in the .materials array corresponds to a submesh, so just adding a material to an object isn't likely to do much.
If you think you still want to, you need to:
create a new blank array of Materials of the right size (+1 or -1 in size)
copy the existing Materials out to the correct spot in this temp array
add (or omit) the newly added (or removed) material.
assign the array o…