Issue with Robot

I'm trying to test a basic robot, and have run into an issue. I have a motor shield connected to an Arduino and the whole thing is powered by 4 AA batteries. This issue is when I turn on the device with the following very simple sketch (used just for testing) I just get a buzzing sound.

There are two DC motors, one attached to M1 and the other attached to M2.

I tried the following to troubleshoot:

I connected the wires of the motors to the + and - screws on the motor shield, and each motor worked, so I know I am getting power to the board, and I know each of the motors work.

I've also double checked to make sure my polarity was correct.

I played around with the KHZ setting in the sketch, not sure if that has any impact, put I've used 80 and 64)

I've attached a pic of my setup (in the pic the motor wires are disconnected as I was testing variables.

Any help would be appreciated.

#include <AFMotor.h> //import your motor shield library
AF_DCMotor motor1(1,MOTOR12_64KHZ); // set up motors.
AF_DCMotor motor2(2, MOTOR12_64KHZ);
 
void setup() {
    motor1.setSpeed(105); 
motor2.setSpeed (105);  
}
 
void loop() {

  
    motor1.run(FORWARD);  
    motor2.run (FORWARD);
}

OPs image

I've attached a pic of my setup (in the pic the motor wires are disconnected as I was testing variables.

I'll never understand how anyone can post a picture showing the middle of a bunch of wires, and expect us to guess where the ends are/go. That picture is useless.

You are using an L293D based shield (readable in the photo), which will be losing 2.5V or
so, so 4AA cells will yield perhaps only 3.5V for the motors, and thus not enough current
to overcome friction. There are much better MOSFET H-bridges for low-voltage use,
the L293D and L298 based H-bridges are ancient darlington drivers, not state of the art(!)

However you could try 5 or 6 AA's in series and see if that cures the problem of your
stalled motors - however it could be that the motors take more current than the L293D can
handle anyway.

expect us to guess where the ends are/go

One end each of the red and black wire are waving around in the air. Who knows, that might be the problem.