I'm having a problem with Random.Range()

Welcome to the community!

This happens because of this two lines of code at the top of your script:

using System;
using UnityEngine;

Read the second paragraph, the one that starts with CS0104.

It says that is an ambiguos reference, that means that both System and UnityEngine have a class named Random, so you have o specify which one you are using (both do the same thing),

If you don’t want to specify you’ll either have to erase the “using System;” line or the “using UnityEgine;” line, but be careful, erasing any of this lines might cause some major issues within code, unless you know what you are doing, I recommend leaving your code as it is.