Read the error message, it couldn't be any clearer:
System.ArgumentOutOfRangeException: ''minValue' cannot be greater than 'maxvalue'
The version of Random.Next you are calling takes two parameters:
Random.Next Method (System) | Microsoft Docs[
^] the first is the minimum value and the second is the maximum value.
The error is saying that the minimum value is greater than the maximum value which means it can't return any values at all!
Swap 'em over, so the smallest is first ... or use the debugger to find out why they are like that.