Modifying Shader Textures Programatically

I would like to work with Shaders programatically. I’ve found several tutorials that allow for this when the Game Object has a Renderer, but I’m using a Raw Image, and don’t have a Renderer. How can I, say, swap out the Textures on a Renderer - not the Raw Image itself?

Thanks!

Turns out when using a Raw Image, you can just ignore getting the renderer and go right at the material. This article is very helpful with the process, although it doesn’t answer the specific question.