Is it possible to proceduraly generate textures in Unity?

hello everyone, i am attempting to create a space game with a randomly generated solar sisten, i was wodnering if it was possible to generate textures, hopefuly with a normal map for each planet, and if so where could i learn to do it. i pareciate your time and thanks in advanced.

Here is an example:

Texture2D CreateTexture()
{
	int width = 100;
	int height = 100;
	Texture2D texture = new Texture2D(width, height, TextureFormat.ARGB32, false);
	texture.filterMode = FilterMode.Point;

	for (int i = 0; i < width; i++) {
		for (int j = 0; j < height; j++) {
			texture.SetPixel(j,height-1-i, Color.red);
		}
	}
	texture.Apply();

    return texture;
}