Problem with running two motors simultaneously

I have been trying to revive one of my old rc cars using arduino uno. I am trying to make it autonomus by using an ultrasoinc sensor but I couldn’t get far with it because of a problem that I do not understand. I am using a L298N motor driver. I connected both of the motors and I don’t think there’s a problem with the electronics but I can’t run the rear motor while steering the front wheels. I think there’s a problem with my code or I’m just missing something obvious. Here’s my code,

int in1 = 9;
int in2 = 8;
int in3 = 3;
int in4 = 4;
int trigPin = 13;
int echoPin = 11;
int speed1;
float echoTime;

void setup() {
  // put your setup code here, to run once:
  pinMode(in1, OUTPUT);
  pinMode(in2, OUTPUT);
  pinMode(in3, OUTPUT);
  pinMode(in4, OUTPUT);
  pinMode(speed1, OUTPUT);
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);

void loop() {
 // put your main code here, to run repeatedly:
  digitalWrite(trigPin, HIGH);
  echoTime = pulseIn(echoPin, HIGH);
  digitalWrite(in1, LOW);
  digitalWrite(in2, HIGH);
  analogWrite(speed1, 80);
  digitalWrite(in1, HIGH); 
  digitalWrite(in2, LOW);
  analogWrite(speed1, 80);
  digitalWrite(in3, LOW);
  digitalWrite(in4, HIGH);

Like I said, I am a newbie therefore I’m sorry if I am missing something obvious. I would appreciate some help,

Your code is incomplete.

It lacks debug prints too.

You declare a variable 'speed1' with no value (so it becomes 0 since it is a global variable) and then you do this:

    analogWrite(speed1, 80);

which means you are treating it as a pin assignment (pin0).

Normally for an L298N driver, you have your in1..4 pins and then also ENA and ENB pins defined and those are the pins you use for your analogWrite()