C# Random sprite spawn script (help)

How would I write code in C# that would randomly spawn 1 of 4 sprites in a set position that spawns every second and also the sprite has a random chance of traveling along the X axis (left or right) or the Y axis (up or down)
I’m new to coding so can you explain it in layman terms, thanks!

For random volume, direction move or something else use Random.Range(min, max). To turn on function after second use yield.
I made this on knee so maybe something doesn’t work:

public Transform someObject; // add object in Inspector
public Transform spawnArea; // add spawn point (empty game object) and set rotation;
Transform spawnDirection = Vector3.zero;
Transform direction = Vector3.zero;

void Start()
{
   nextSpawn(); // start spawn loop
}

IEnumerator nextSpawn() // wait one second and run next function
{
   yield return new WaitForSeconds(1); // one second
   Spawn();
}

void Spawn() // put objects on scene
{
   float howmuch = Random.Range(1,4);
   for(int i = 0; i < howmany; i++) // for all objects do the same
   {
      // if 0 don't rotate, if 1 turn left, if 2 turn right (remember rotation of your spawnArea)
      int dir = Random.Range(0,1);
      direction = spawnArea.rotation.eulerAngles.y; // actual spawnArea rotation
      if(dir == 1) { direction += 90; }
      else if(dir == 2) { direction -= 90; }
     
      spawnDirection.rotation = Quaternion.Euler(0, direction, 0);    

     // create new object on scene
     Instantiate(someObject, spawnArea.position, spawnDirection.rotation);
   }

   //  at the end, start again nextSpawn
   nextSpawn(); // loop
}

Its showing me that there are compiler errors.
Assets/Scripts/SpawnControl.cs(21,8): error CS1525: Unexpected symbol Spawn' Assets/Scripts/SpawnControl.cs(35,16): error CS1525: Unexpected symbol else’

I corrected first code - look up.
in 21 put the end of line ;
in 34 also put ;

Is there some way to contact you because I’m still getting errors?

Switch to Inbox and click on “conversation”.