As the error message tells you, it expects a mutable reference of the generator, in this case Xoshiro256.
To fix this you need to store it in a sperate, mutable variable:
var prng = std.rand.DefaultPrng.init(0);
const rnd = prng.random();
By putting it all in one line you created a temporary variable, which is always constant.