Create a prefab of a sprite from the sprite collection, instantiate it and then change the sprite Id using something like this:
int randomSprite = 0;
do {
randomSprite = Random.Range(0, sprite.Collection.Count);
} while (!sprite.Collection.spriteDefinitions[randomSprite].Valid);
sprite.SetSprite( randomSprite);
the while loop is necessary in case you have deleted / invalid sprites in your collection.