Load Texture depending on variable passed

I’m trying to create grid of images that i will add during the runtime.

The way i am doing this is by creating a prefab with image component and adding it to a list, then changing its sprite (If there’s a better way of creating an image object with custom images then please tell) using a method with some argument that will decide the image.

The problem i struck into, is that i don’t know how to load a texture with a string. And everyone on the internet says that you should avoid Resources folder by any means. Of course i can load all icons into a list, and then load then with some int variable, but this seems inconvenient.

Please tell me what i can do.

Maybe have a struct with a sprite and string in it, serialize this and make an array in your script. This way you can make a list of sprite/string combinations.
In Awake you put this data into a dictionary.
At runtime use the string as key, so you get a sprite out of the dictionary