When I rotate one bone in the legs both legs move, why is that?

Because they’re weighted to the ones you move.

I’m a complete begginer and in the tutorial I watched it said to press autoweight. Is there any way to fix this problem?

Go into the weight paint mode and go over all your bones. You want everything to be blue except the area you want to deform with that bone.

Like this?

Watch a tutorial on weight painting

Like this then?

Kinda, but you have alot of weight over the back of the dog. You want everythign to be blue except for the upper leg.

And then you repeat this for each bone.

Thanks for helping! I figured it out.