Random numbers from 0 to 9 by using variables when pressed button?

hey everyone, I’m trying to create a simple random number generator by using variables but I stuck.

here is the silly approach to solve this issue:

In short I bind the some random numbers by using set variable option. But I assume there should be a better appoach to make this in Figma.

here is the prototype

thanks in advance,