My servo is moving 360 whenever it receives power

The servo in question is a 9g servo, I cut the bottom of the gear connected to the potentiometer and now when ever I connect my Elegoo Uno R3 it starts spinning 360 no matter what the code.

That explains your observation.

Yes in the servo there was a plastic cylinder that went down into the servo and into the potentiometer and I removed it

Welcome to the forum

Why ?

I looked up a guide and that what it said to do

What did you expect it to do after the modification ?

Receive code and rotate to this code:
//myServo.write(60);

How exactly were you expecting it to rotate even if the code were not commented out ?

Please post your full sketch, using code tags when you do

In my experience the easiest way to tidy up the code and add the code tags is as follows
Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.

I'm using this servo for a set of wheels, so I expected it to rotate one direction when told to rotate that way, stop when told, and also move the opposite way when told.

this is my full test sketch:

#include <Servo.h>

Servo myServo;  // create servo object to control a servo

void setup() {
  // attaches the servo on pin 10 to the servo object
}

void loop() {
  myServo.write(60);    // rotate continuously in one direction 
  delay(2000);          // wait for 2 seconds
  myServo.write(120);   // rotate continuously in the opposite direction
  delay(2000);          // wait for 2 seconds
  myServo.write(90);    // stop rotation (neutral position)
  delay(2000);          // wait for 2 seconds
}

What happens when you upload that sketch ? Does the "servo" change its direction of rotation ?

Please post a link to the advice that you followed about modifying the servo

I'm a little dumb, all i needed to do was set the potentiometer to its neutral position.

I am glad that you got it working the way you want