On the RandomGraph algorithm, GetRndNId does not return an id of a random node in graph each subsequent program executions.
The solution is : The random generator must be seeded first.
Reference :
GetRndNId()
Returns an ID of a random node in the graph. For this method to return different values on subsequent program executions, the random generator must be seeded first, for example with TRnd.Randomize().
https://snap.stanford.edu/snappy/doc/reference/graphs.html
Before :

After :
