the easiest i can think about would be to have a variable (e.g. spawnTime) to store the new time were you want to spawn.
on start and inside spawn_cube, calculate the time you want to spawn adding randomly 5 to 10 seconds (spawnTime = time.time + system.random(5,10) ) or something like that.
It works, I tried with yield and it didnt worked but this works very well
– nikolaradovicBut how can I relate spawn point to main camera? spawn_position = new Vector3(0,0,0);
– nikolaradovic